In a file allocation system, which of the following allocation scheme(s) can…

2017

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

  1. A.

    I and III only

  2. B.

    II only

  3. C.

    III only

  4. D.

    II and III only

Attempted by 320 students.

Show answer & explanation

Correct answer: D

 Contiguous Allocation

In contiguous allocation, each file occupies a set of adjacent blocks on the disk. Since the blocks must be continuous, even if total free space is enough, it might not be available in one stretch.

Hence, external fragmentation occurs because large files cannot be allocated if contiguous space is not available.

 Linked Allocation

In linked allocation, each file is a linked list of scattered blocks, where every block contains a pointer to the next block. Here, blocks need not be contiguous; the system can use any free block available on the disk.

Because of this non-contiguous nature, there is no external fragmentation in linked allocation.

Indexed Allocation

In indexed allocation, a special index block is used to store the addresses of all data blocks of a file.All the file’s data blocks can be placed anywhere on the disk, and their locations are tracked through the index block.

As the blocks are not required to be contiguous, no external fragmentation occurs in this scheme.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir