Question
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
Official answer and solution
- Official answer
- B
- From
- Official GATE 2012 answer key
Solution
Calculate the maximum file size addressable via 8 direct, 1 single indirect, and 1 double indirect block pointers.
- Given disk parameters:
- Block size = 128 Bytes
- Disk block address pointer size = 8 Bytes
- Number of block pointers that fit in one disk block:
- Calculate addressable data blocks:
- Direct blocks:
- Single indirect block:
- Doubly indirect block:
- Total addressable data blocks:
- Maximum file size:
- This matches option (B).
B
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2012 Computer Science and Information Technology (CS)
- Question
- 41 of 65, printed as CS Q.41
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.