File System Structure
- Disk layout
- MBR, including partition table.
- Partitions, each containing a file system.
- Traditional: Master Boot Record (MBR) layout. (AKA DOS layout.)
- Fixed-size partition table.
- Extended partitions allow more.
- Newer: GUID Partion Table (GPT) layout.
- Many partitions (table not fixed size).
- Partition types given by GUIDs, which are large identifiers.
- Text figure illustrates layout of a Unix fs, but layout in a partition
will depend on OS.
- There are many different file system designs.
- Usually associated with a particular O/S.
- Or with media type.
- Most OSes must support more than one type of FS.
- File systems are generally part of the OS, but some may be
supported in user space.
- File layout.
- Efficiency of operations:
- Sequential reading.
- Random-access reading.
- File growth.
- Basic approaches.
- Contiguous.
- Linked.
- Simple linked files.
- FAT.
- Indexed (i-nodes).
- Basic indexes.
- Index with blocks.
- Real systems make variations and combinations of these.
- Directory layout.
- A directory is just a list of files, given by location on disk.
- File name may be recorded in the directory entry, or the file.
Other meta-data likewise.
- Directory may be a list of fixed-size entries.
- Easy to maintain.
- Tends to create a short limit on file names.
- Directory may be a list variable-size entries.
- Same sort of problems as variable partitions.
- More flexible
- May combine fixed records with a head area for file names.
- In practice, don't seem to use fancy search-able structures.
- Multiple directory entries
- Hard linking.
- Some FSs allow a file to have multiple directory entries (Unix).
- Some do not (Windows).
- Allows a file to have multiple names. (At least different full
path names.)
- Soft linking.
- Some systems allow a special file which name another.
- Allows a file to have multiple names with only one directory entry.
- Text mentions log-structured file systems.
- Text mentions virtual file systems.