Skip to content
Official PYQ · 2004

GATE CS 2004 Q49 — I/O Scheduling

Explain with AI

A unix-style I-nodes has 1010 direct pointers and one single, one double and one triple indirect pointers. Disk block size is 11 Kbyte, disk block address is 3232 bits, and 4848-bit integers are used. What is the maximum possible file size?

Choose one option
View worked solution

Answer: C

To find the maximum possible file size, we calculate the maximum number of disk blocks that can be addressed by the inode structure and multiply it by the disk block size.

Step 1: Calculate the number of block pointers per disk block

  • Disk block size: 1 KB=1024 bytes1 \text{ KB} = 1024 \text{ bytes}
  • Disk block address size: 32 bits=4 bytes32 \text{ bits} = 4 \text{ bytes}

Number of pointers per block=1024 bytes4 bytes=256=28\text{Number of pointers per block} = \frac{1024 \text{ bytes}}{4 \text{ bytes}} = 256 = 2^8

Step 2: Calculate the total number of blocks addressable by the inode

  • Direct pointers: 1010 blocks
  • Single indirect pointer: 1×28=281 \times 2^8 = 2^8 blocks
  • Double indirect pointer: 1×28×28=2161 \times 2^8 \times 2^8 = 2^{16} blocks
  • Triple indirect pointer: 1×28×28×28=2241 \times 2^8 \times 2^8 \times 2^8 = 2^{24} blocks

Total blocks=10+28+216+224≈224 blocks\text{Total blocks} = 10 + 2^8 + 2^{16} + 2^{24} \approx 2^{24} \text{ blocks}

Note: Since 2242^{24} is significantly larger than the other terms, the smaller terms can be neglected for the approximation.

Step 3: Calculate the maximum file size

Maximum file size≈224×1 KB=224×210 bytes=234 bytes\text{Maximum file size} \approx 2^{24} \times 1 \text{ KB} = 2^{24} \times 2^{10} \text{ bytes} = 2^{34} \text{ bytes}

Step 4: Verify with the integer size constraint

The problem mentions that 4848-bit integers are used (likely for representing file sizes or offsets). A 4848-bit integer can address up to 2482^{48} bytes. Since 234<2482^{34} < 2^{48}, the file size is limited by the inode structure, which is approximately 2342^{34} bytes.

Thus, the maximum possible file size is 2342^{34} bytes.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore I/O Scheduling questions