File System Implementation
- 72Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What is the purpose of a file system on a mass-storage device?
It provides users with access to stored items while organizing data so it can be stored and retrieved efficiently.
Or swipe the card
72 cards
What is the purpose of a file system on a mass-storage device?
It provides users with access to stored items while organizing data so it can be stored and retrieved efficiently.
Why are storage blocks and sectors commonly sized as powers of two?
Powers-of-two sizes allow blocks and sectors from different devices to fit together efficiently.
What is a logical block?
A logical block is a file-system unit composed of multiple physical disk sectors.
What information is stored in a file control block?
Information about a file, such as its name, creation date, size, and other metadata.
What is the role of a device driver in file-system access?
It performs the physical access to the storage device, such as reading a specified sector or block into memory.
Why do file systems use multiple abstraction layers?
To separate user-oriented file operations from logical file organization and device-specific physical operations.
How does layering simplify adding a USB drive or other new device?
Only the device-specific driver needs to differ; higher layers can operate in the same way.
What is the purpose of a disk controller buffer?
It temporarily holds data read from the disk until the requesting part of the computer is ready to receive it.
What is the relationship between logical and physical file systems?
The logical file system presents files and metadata, while lower layers translate those requests into physical device operations.
Why do different devices or purposes use different file systems?
Devices and workloads have different requirements for metadata, access patterns, performance, and organization.
What is a boot control block?
A structure on a storage device containing information needed to start an operating system from that device.
What information must be recorded about a storage volume?
Its number of blocks, starting and ending locations, and which space is used or free.
What is a partition?
A partition is a logical section into which a storage device is divided.
What does mounting mean?
Mounting connects a partition or storage volume to a location in the operating system’s file-system hierarchy.
Why must file-system data be written back before removing a storage device?
Because modified directory structures, file control blocks, pointers, and data may still exist only in memory.
What is the purpose of a root partition?
It is the main partition that commonly stores the operating system.
Why does an operating system check a file system during startup?
To verify that the storage device and its file-system structures are consistent.
What can happen if a file-system consistency check fails?
The operating system may perform a more detailed repair or checking process, and access problems or data loss may result.
How can different partitions be used for different types of data?
Separate partitions can store programs, user data, or other categories of information and be mounted at different locations.
What is the main disadvantage of storing directory entries in a linear list?
Searching becomes slower as the directory grows.
On average, how much of a linear directory list must be searched to find an entry?
Approximately half of the list.
What is a hash table used for in directory organization?
It provides faster access to directory entries by mapping file data, such as a name, to a location or number.
What property should a hash function provide for the same input?
The same input should always produce the same hash value.
What is a hash collision?
A collision occurs when different inputs produce the same hash value.
Why might a file system keep directory structures in memory?
To avoid repeatedly reading the directory from disk when opening or locating files.
Why might a file control block also be cached in memory?
To provide rapid access to a file’s location and metadata while the file is being used.
Why can caching directory structures require substantial memory?
Large storage systems and many storage devices may contain many directories and file-access tables.
What is contiguous file allocation?
It stores all blocks of a file consecutively on the storage device.
Why does contiguous allocation provide good performance?
Sequential blocks can be read consecutively with minimal movement or repositioning of the storage device.
What information is sufficient to locate a contiguously allocated file?
Its starting block and its length or number of blocks.
What block size was used in the contiguous-allocation example?
Each block was 512 bytes.
What is the main problem when a contiguously allocated file grows?
There may not be enough consecutive free space immediately after the file, requiring the file to be moved.
How does contiguous allocation cause external fragmentation?
Deleting or moving files can leave separated free regions that are individually too small for a new large file.
What is compaction in storage allocation?
Compaction moves allocated blocks together to create larger contiguous regions of free space.
Why might a system use contiguous allocation for an operating-system partition?
Operating-system files often change little, so contiguous allocation can provide simple and fast access without frequent growth problems.
What is an extent?
An extent is a contiguous set of blocks allocated to a file as a unit.
How does extent-based allocation handle file growth?
It allocates another contiguous extent when the file needs more space.
What must be done when a file consists of multiple extents?
The extents must be linked or recorded together so the system knows they belong to the same file.
What is the main advantage of allocating one block at a time and linking blocks?
A file can grow incrementally without reserving unused space in advance.
What is the main performance disadvantage of linked allocation?
The blocks of a file may be scattered across the disk, causing frequent device movement and slower access.
How can a defragmentation utility improve access to a linked file?
It moves the file’s scattered blocks into one large contiguous region.
Why can linked allocation create reliability problems?
If a link in the chain is lost or corrupted, the system may not know where to find the remaining blocks.
How does a file allocation table represent a linked file?
It records the file’s first block and identifies the next block for each linked block until the chain ends.
How does a file allocation table indicate the end of a file?
The final allocation-table entry contains an end-of-file marker rather than a pointer to another block.
What advantage does storing the entire block chain in a file allocation table provide?
The system can follow file allocation links through the table without reading each data block just to discover the next block.
What is a limitation of a linked allocation method that stores only a starting block?
The system may need to read each block in sequence to discover the location of the next block.
What is indexed allocation?
Indexed allocation uses an index block containing pointers to all or part of a file’s data blocks.
What is the performance advantage of an index block?
The system can obtain the locations of many file blocks from one index and request them without traversing the file block by block.
What is the main overhead of indexed allocation?
Space is required for the index block, even if the file does not use every available index entry.
How can indexed allocation support files larger than one index block?
One index block can point to another index block containing additional data-block pointers.
What is a single-indirect block?
It is an index block that points directly to data blocks.
What is a double-indirect block?
It is a block that points to index blocks, which then point to data blocks.
What is a triple-indirect block?
It is an index structure with three levels of pointers before reaching the data blocks.
Why might a file system combine direct, single-indirect, double-indirect, and triple-indirect pointers?
To efficiently support files of different sizes and access patterns.
What is a bitmap used for in free-space management?
It records whether each storage block is available or occupied using one bit per block.
According to the described bitmap convention, what do the bit values indicate?
A value of 1 indicates a usable free block, while 0 indicates a block that cannot be used.
How can a CPU instruction speed up bitmap searches?
It can identify the offset of the first set bit, quickly locating a free block without another disk access.
What is the memory cost of a bitmap for a 1-terabyte disk in the example?
It requires approximately 64 megabytes of memory.
How does a linked free-space list represent available blocks?
It stores a pointer to the first free block, and each free block points to the next free block.
What information is needed to begin traversing a linked free-space list?
The location of the first free block and the number of free blocks.
What is the drawback of a one-block-at-a-time free-space list?
Finding many free blocks may require following a long chain of pointers and repeatedly accessing storage.
How does grouping free blocks improve free-space management?
A group entry can record the starting location and size of a contiguous run of free blocks, plus the next group.
What are meta slabs used for in very large storage systems?
They divide the storage space into multiple smaller free-space maps instead of one map for the entire system.
Why can free-space management become difficult on very large storage systems?
The complete free-space information may be too large to keep in memory and may need to be stored on disk.
Why is disk access generally more expensive than an additional CPU instruction?
Disk access involves relatively slow mechanical or device operations, whereas a CPU instruction executes much more quickly.
What is read-ahead in file-system performance optimization?
Read-ahead retrieves additional blocks that are likely to be requested soon and places them in a buffer or cache.
Why is read-ahead especially useful for contiguous files?
If one block is requested, nearby sequential blocks are likely to be needed next.
What is caching in file-system access?
Caching stores recently read or frequently used file-system data in memory for faster reuse.
What trade-off is involved in using buffers and caches?
They improve access speed but require additional memory or memory chips.
What is write-behind or delayed writing?
It postpones writing modified data to storage and later writes several changes together.
Why can delayed writing create a risk when a device is removed suddenly?
Some modified data or metadata may still be in memory and not yet saved to the device.
What factors influence the choice of a file-allocation method?
File size, whether files grow or change, expected access patterns, available memory, reliability requirements, and performance goals.

Ask anything
We've read this whole study set, so questions about it get the best answers.