• S
    SwaseekhGATE Preparation
General
  • Dashboard
  • Syllabus
  • Questions
  • Aptitude
  • Mock Tests
  • TCS NQT 2026
Account
  • Pricing
  • Contact
  1. GATE CS
  2. PYQs
  3. Operating System

In a particular Unix OS, each data block is of size 1024 bytes, each inode has 10 direct data block addresses and three additional addresses: one for single indirect block, one for double indirect block and one for triple indirect block. Also, each block can contain addresses for 128 blocks. Which one of the following is approximately the maximum file size? A. 512 MB B. 2 GB C. 8 GB D. 16 GB

GATE 2004 · Operating System · File System · medium

Answer: The maximum file size is approximately 2 GB. Correct answer: B. 2 GB

  1. Count blocks from each addressing tier: Direct: 10 blocks Single-indirect: 128 blocks Double-indirect: 128^2 = 16,384 blocks Triple-indirect: 128^3 = 2,097,152 blocks Total = 10 + 128 + 16,384 + 2,097,152 = 2,113,674 blocks
  2. Convert total blocks to bytes and then to GB: file_size = 2,113,674 * 1024 bytes = 2,164,402,176 bytes Convert to GB: 2,164,402,176 / 2^30 = 2,164,402,176 / 1,073,741,824 approx 2.016 GB Verification using only the dominant term (triple-indirect): 128^3 = 2^21 blocks 2^21 * 1024 = 2^21 * 2^10 = 2^31 bytes = 2 GB All four tiers combined: approximately 2 GB (lower tiers add negligible overhead).