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
GATE CSE 2012Operating System › I/O, Disk Scheduling & File SystemsVerified
GATE CSE 2012 PYQ: A file system with 300 300 300 GByte disk uses a file descriptor with 8 8 8 direct block addresses, 1 1 1…
- A3 KBytes
- B35 KBytesCorrect answer
- C280 KBytes
- Ddependent on the size of the disk
Answer
(B) 35 35 35 KBytes
Approach
Compute how many block addresses fit in one disk block, then count how many data blocks are reachable through direct, singly indirect, and doubly indirect pointers. Multiply the total data block count by the disk block size to get the maximum file size.
The file descriptor can address 8 direct blocks, 16 indirect blocks, and 256 doubly indirect blocks, for a total of 8 + 16 + 256 = 280 data blocks. With each block 128 bytes, the maximum file size is 280 × 128 = 35840 bytes = 35 KB. Therefore option B is correct.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.