chapter 40 - file system implementation Flashcards
What are the two main aspects to understand in a file system?
- Data structures (inodes, bitmaps, data blocks)
- Access methods (system call handling like open, read, write)
What does an inode store?
Metadata about a file: type, size, owner, permissions, timestamps, and pointers to data blocks
What is the role of the superblock in a file system?
stores metadata like the number of inodes, number of data blocks, and locations of inode/data regions
Why do file systems use both direct and indirect pointers in inodes?
Direct pointers allow fast access for small files; indirect pointers enable support for large files
What does the inode number (i-number) do?
It indexes into the inode table to locate a file’s metadata
What maps human-readable file names to inode numbers?
Directories
Why are bitmaps used in file systems?
To track which inodes and data blocks are in use or free
How are files found on disk using inodes?
The inode number indexes into an inode table that contains the file’s metadata and data block pointers
What does the Open File Table (OFT) track?
File inode, access mode, current offset, and reference count
What happens when write() needs to allocate a new block?
The file system updates the data bitmap, modifies the inode, and writes data to the allocated block