Skip to content
Official PYQ · 2019

GATE CS 2019 Q42 — File Systems

Explain with AI
The index node (inode) of a Unix -like file system has 1212 direct, one single-indirect and one double-indirect pointers. The disk block size is 44 kB, and the disk block address is 3232-bits long. The maximum possible file size is (rounded off to 11 decimal place) ____ GB
View worked solution

Answer: 4.0 : 4.1

To find the maximum possible file size, we first calculate the number of disk block addresses that can be stored in a single disk block.

  • Disk Block Size (DBDB): 4 kB=212 bytes4\text{ kB} = 2^{12}\text{ bytes}
  • Disk Block Address Size: 32 bits=4 bytes32\text{ bits} = 4\text{ bytes}
  • Addresses per block (NN): 4 kB4 bytes=1024=210\frac{4\text{ kB}}{4\text{ bytes}} = 1024 = 2^{10}

The inode structure contains:

  • 1212 direct pointers
  • 11 single-indirect pointer (points to a block containing NN direct pointers)
  • 11 double-indirect pointer (points to a block containing NN single-indirect pointers, which in turn point to N2N^2 direct pointers)

The total number of blocks (BB) accessible is:

B=12+N+N2=12+1024+10242=1,049,612 blocksB = 12 + N + N^2 = 12 + 1024 + 1024^2 = 1,049,612\text{ blocks}

The maximum possible file size (SS) is:

S=B×DB=(12+1024+1048576)×4 kBS = B \times DB = (12 + 1024 + 1048576) \times 4\text{ kB} S=48 kB+4 MB+4 GBS = 48\text{ kB} + 4\text{ MB} + 4\text{ GB}

Converting the total size to gigabytes (1 GB=230 bytes1\text{ GB} = 2^{30}\text{ bytes}):

S=4+41024+481024×1024 GB≈4.004 GBS = 4 + \frac{4}{1024} + \frac{48}{1024 \times 1024}\text{ GB} \approx 4.004\text{ GB}

Rounding off to 11 decimal place, the maximum possible file size is 4.0 GB.

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

Published
Report a correction
Keep exploringMore File Systems questions