In _____ allocation method for disk block allocation in a file system,…
2015
In _____ allocation method for disk block allocation in a file system, insertion and deletion of blocks in a file is easy.
- A.
Index
- B.
Linked
- C.
Contiguous
- D.
Bit Map
Attempted by 334 students.
Show answer & explanation
Correct answer: B
Answer: Linked allocation
Why linked allocation is correct:
Each file is stored as a linked list of disk blocks; every block holds a pointer to the next block.
Insertion and deletion are easy because adding or removing a block only requires updating the pointer(s) in adjacent block(s); blocks do not need to be moved to maintain contiguity.
Trade-offs and limitations:
Random access is inefficient because you must follow pointers sequentially from the file start to reach a specific block.
Each block needs space for a pointer, which adds overhead; pointer corruption can harm file integrity.
Brief comparison with other methods:
Indexed allocation stores pointers in an index block, giving efficient direct access; insertion/deletion requires updating the index and may need extra index space, so it is not as inherently simple as linked allocation.
Contiguous allocation requires consecutive blocks; insertion or deletion is difficult because maintaining contiguity may require moving blocks or causes external fragmentation.
A bit map is a free-space tracking structure, not a file-block allocation scheme; it helps find free blocks but does not itself make insertion/deletion within a file easy.