The GATE Grind

GATE 2019 CS – Question 52

Operating System · File Systems and Disk Performance · 2 marks · Numerical answer

The index node (inode) of a Unix-like file system has 12 direct, one single-indirect and one double-indirect pointers. The disk block size is 4 kB, and the disk block address is 32-bits long. The maximum possible file size is (rounded off to 1 decimal place) ________ GB.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 3.98 to 4.02

Explanation

A 4 kB block holds $\frac{4096}{4}=1024$ pointers. The number of data blocks is $12+1024+1024^2=1{,}049{,}612$. The file size is $1{,}049{,}612\times4\text{ kB}\approx4.0$ GB.