Operating Systems
I/O Subsystem & File Systems
GATE 2012
Hard
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
- A3 KBytes
- 35 KBytes
- C280 KBytes
- Ddependent on the size of the disk
Explanation
Each block holds 128/8 = 16 addresses. Direct blocks: 8 × 128B = 1024 B. Single indirect: 16 × 128B = 2048 B. Doubly indirect: 16 × 16 × 128B = 32768 B. Total = 1024 + 2048 + 32768 = 35840 B = 35 KB.
Source: GATE CS 2012 (2012)
This question is part of a 15-day revision cycle — sign in and Project Forge will bring it back the day before you'd forget it.