Skip to content
Official PYQ · 2002

GATE CS 2002 Q2.22 — File Systems

Explain with AI

In the index allocation scheme of blocks to a file, the maximum possible size of the file depends on

Choose one option
View worked solution

Answer: C

In an indexed allocation scheme, a file's directory entry points to an index block (or a set of index blocks) containing pointers to the actual data blocks of the file.

To determine the maximum possible size of a file, we need to calculate the maximum number of data blocks that can be addressed. Let us define the key parameters:

  • Block Size (BB): The size of each disk block (in bytes).
  • Block Address Size (AA): The number of bytes required to store a single disk block address.
  • Number of Index Blocks (NN): The total number of blocks allocated to hold the index pointers (which can be organized as a single block, linked index blocks, or multi-level index blocks).

Using these parameters:

  1. The number of pointers that can fit into a single index block is given by ⌊B/A⌋\lfloor B / A \rfloor. This directly depends on the size of the blocks (BB) and the size of the address of the blocks (AA).
  2. The total number of data blocks that can be indexed is determined by the number of blocks used for the index (NN) multiplied by the capacity of each index block.
  3. Finally, the maximum file size is calculated as: Maximum File Size=(Total addressable data blocks)×B\text{Maximum File Size} = (\text{Total addressable data blocks}) \times B

Thus, the maximum possible file size depends on all three factors: the size of the blocks, the number of blocks used for the index, and the size of the address of the blocks.

Therefore, the correct option is C.

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

Published
Report a correction
Keep exploringMore File Systems questions