Question

A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is

Choose one option
Official answer and solution
Official answer
B
From
Official GATE 2012 answer key

Solution

Calculate the maximum file size addressable via 8 direct, 1 single indirect, and 1 double indirect block pointers.

  1. Given disk parameters:
  • Block size = 128 Bytes
  • Disk block address pointer size = 8 Bytes
  1. Number of block pointers that fit in one disk block:
Pointers per block=128 Bytes8 Bytes=16\text{Pointers per block} = \frac{128 \text{ Bytes}}{8 \text{ Bytes}} = 16
  1. Calculate addressable data blocks:
  • Direct blocks: 8 blocks8 \text{ blocks}
  • Single indirect block: 1×16=16 blocks1 \times 16 = 16 \text{ blocks}
  • Doubly indirect block: 1×16×16=256 blocks1 \times 16 \times 16 = 256 \text{ blocks}
  1. Total addressable data blocks:
Total blocks=8+16+256=280 blocks\text{Total blocks} = 8 + 16 + 256 = 280 \text{ blocks}
  1. Maximum file size:
Maximum file size=280×128 Bytes=35840 Bytes\text{Maximum file size} = 280 \times 128 \text{ Bytes} = 35840 \text{ Bytes}
In KBytes=358401024 KBytes=35 KBytes\text{In KBytes} = \frac{35840}{1024} \text{ KBytes} = 35 \text{ KBytes}
  1. This matches option (B).
Final answer

B

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

Source

Paper
GATE 2012 Computer Science and Information Technology (CS)
Question
41 of 65, printed as CS Q.41
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.