Question

In a file allocation system, which of the following allocation scheme(s) can be used if no external fragmentation is allowed?

I. Contiguous
II. Linked
III. Indexed

Choose one option
Official answer and solution
Official answer
D
From
Official GATE 2017 answer key

Solution

Analyze disk allocation methods for the occurrence of external fragmentation.

Evaluate the file allocation schemes:

  1. Contiguous allocation: Requires each file to occupy a contiguous set of disk blocks. As files are created, enlarged, and deleted, free disk space is broken into small non-contiguous chunks, leading to significant external fragmentation.
  2. Linked allocation: Each file is a linked list of disk blocks scattered anywhere on the disk. Any free block can satisfy an allocation request, so no disk space is wasted outside blocks. Therefore, it suffers from NO external fragmentation.
  3. Indexed allocation: Brings all pointers of a file together into an index block. Disk blocks can be allocated anywhere on the storage medium from the free-space list. Thus, it suffers from NO external fragmentation.

Both Linked (II) and Indexed (III) allocation methods avoid external fragmentation entirely. This matches option D.

Final answer

D

Common trap

Confusing internal fragmentation with external fragmentation. Indexed and linked allocations suffer from small internal fragmentation or pointer overhead, but zero external fragmentation.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2017 Computer Science and Information Technology (CS) Session 2
Question
8 of 65, printed as CS Q.8
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.