The index node (inode) of a Unix-like file system has 12 direct, one…
2019
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.
Attempted by 76 students.
Show answer & explanation
Correct answer: 4
Key idea: count how many data blocks can be addressed (direct + single-indirect + double-indirect) and multiply by the block size.
Block size = 4 KB = 4096 bytes. Each block address is 32 bits = 4 bytes, so a block used as an index can hold 4096 / 4 = 1024 addresses.
Number of data blocks addressable = 12 (direct) + 1024 (single-indirect) + 1024 × 1024 (double-indirect) = 12 + 1024 + 1,048,576 = 1,049,612 blocks.
Total bytes = 1,049,612 × 4096 = 4,299,210,752 bytes.
Convert to gigabytes (decimal, 1 GB = 10^9 bytes): 4,299,210,752 / 10^9 ≈ 4.2992 → rounded to 1 decimal place: 4.3 GB.
If using binary gibibytes (1 GiB = 2^30 bytes), the size is 4,299,210,752 / 1,073,741,824 ≈ 4.0 GiB.
Final answer (rounded to 1 decimal place): 4.3 GB (or equivalently about 4.0 GiB).
A video solution is available for this question — log in and enroll to watch it.