FAT File Systems Flashcards
What should a file system provide to the application later of the operation system
A file system provides an abstraction of non-volatile storage to the application layer, this abstraction should be the same no matter what physical device is being used for storage
This should also be structured
What does the device controller provide to the bus protocol of a given device when discussing storage devices
Block Abstraction of the physical layer
What does it mean for hardware to be a “block device”
It means that the layer which actually stores the data can be managed as fixed-size blocks
What metadata does a FAT file system hold
The File Allocation Table
Directory Entries (start, size, name)
What must be considered when deciding how large to make a block size for a FAT file system
When using a large block size there is:
- Less overhead as the FAT can be smaller
- A higher amount of space lost due to internal fragmentation from files not taking up full blocks
Average block size is 4kB or 8kB on average
What was the purpose of Software Skew on CP/M
To give the CPU time to process one thing it read, before reading the next sector
What are the three highest level items of a FAT FS
The Master Boot Record
The Partition Table
Partitions
What does the Master Boot Record hold
It holds information on how the disk sectors are divided into partitions and can contain information on how to load the operating system
What does the Partition Table Hold
Information about each partition of the disk:
- Is it bootable
- Where is its first block
- What is its type
- What is its size
What does a Partition start with and what is some of the information this holds
The Volume Boot Record (also known as the Volume ID)
- Name
- Size of Sectors and Clusters
- Sectors per File Allocation Table
- Hidden Sectors (these never got usefully used)
Why does the Fat File System traditionally have more than one FAT, and where is the number of these FATs stored
There are often 2 (or more) FAT tables such that if one is damaged the files on the drive can be recovered, dating to when disks were more fragile
The number of these is stored in the Volume Boot Record
What does a directory entry store
- The directory name
- Attributes such as read only
- Creation/ modification time
- The size
For short directory names, how can a directory be marked as deleted
By setting the first character to a special character (0xe5)
What does the value of a FAT entry denote
The value of a given FAT entry denotes the index to the next cluster, unless a special character is used denoting something such as Unused, End of Cluster Chain or Bad
How can the start of the FAT be calculated from the Volume ID?
FATstart=LBAbegin+ Reserved Sectors x Bytes/ Sector