- 2072 Magh · 4+5 marks
File system layers; linked list vs index
Short answer
Layers: application, logical (metadata), file-organization (logical-to-physical mapping), basic (block I/O, caching), I/O control. Linked list allocation stores the next pointer in each data block, wasting space and making random access slow. FAT (linked list using index) keeps all pointers in a memory table, enabling faster random access but requiring memory proportional to disk blocks.
Explain the role of each layer in a file system. Compare and contrast the linked list allocation and linked list allocation using index method.
Layers of a file system and their roles
+-----------------------------+
| Application programs |
+-----------------------------+
| Logical file system |
+-----------------------------+
| File-organization module |
+-----------------------------+
| Basic file system |
+-----------------------------+
| I/O control (device drivers)|
+-----------------------------+
| Devices (disk) |
+-----------------------------+
- Application programs: request file services through system calls (open, read, write).
- Logical file system: manages metadata: directory structure, file control blocks (i-nodes), names, protection and security.
- File-organization module: knows files and their logical blocks and physical blocks; translates logical block addresses to physical ones; handles allocation methods and free-space management.
- Basic file system: issues generic commands to the device driver ("read block 123"); manages buffers and caches of blocks.
- I/O control: device drivers and interrupt handlers that transfer data between memory and disk using low-level commands for the controller.
- Devices: the physical disk. Layering reduces duplication and eases design, though it adds overhead.
Linked list allocation vs linked list with index (FAT)
| Point | Linked list | Linked list using index (FAT) |
|---|---|---|
| Where pointers are | In each data block | In a table (FAT) kept in memory |
| Usable data per block | Block size - pointer | Whole block |
| Random access | Slow, each block read from disk | Faster, the chain is followed in memory |
| Memory required | None | The whole table (entries = number of blocks) |
| Reliability | One damaged pointer loses the rest of the file | The table can be duplicated; one copy damaged is recoverable |
| Scalability | Good for any disk size | Poor for big disks (large table) |
| Example | Original Alto/early systems | MS-DOS FAT12/16/32 |
Both avoid external fragmentation and allow files to grow; the indexed version is quicker but needs memory.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- File system layout; i-node vs linked list · Operating System, chapter 5
- File system vs virtual memory; contiguous allocation · Operating System, chapter 5
- Linked list file system; block size impact · Operating System, chapter 5
- File allocation and access methods · Operating System, chapter 5
- File allocation methods; free space management · Operating System, chapter 5 · asked 2×
- File and attributes; allocation methods · Operating System, chapter 5
- Compare and contrast pollution in a city · Communication English, chapter 1
- Switching, circuit vs packet, X.25 layers · Data Communication, chapter 7
- Operating system layers · Distributed System, chapter 3
- DS vs centralized; layers of transparency · Distributed System, chapter 1