Skip to content
Official PYQ · 2008

GATE CS 2008 Q20 — File Systems

Explain with AI

The data blocks of a very large file in the Unix file system are allocated using

Choose one option
View worked solution

Answer: D

In the Unix File System (UFS), file allocation is managed using an inode (index node) structure, which is an extension of indexed allocation (often referred to as multi-level indexed allocation).

Here is how the allocation is structured to support files of varying sizes:

  • Direct Pointers: The inode contains a small number of direct pointers (typically 12) that point directly to the data blocks. This provides extremely fast access for small files.
  • Indirect Pointers: For larger files, the inode contains:
    • A single indirect pointer pointing to an index block containing pointers to data blocks.
    • A double indirect pointer pointing to an index block containing pointers to other index blocks, which then point to data blocks.
    • A triple indirect pointer for even larger files.

This hybrid structure allows the file system to dynamically scale and support very large files while maintaining low overhead for small files. Therefore, it is an extension of the basic indexed allocation scheme.

Hence, the correct option is D.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore File Systems questions