Question

A FAT (file allocation table) based file system is being used and the total overhead of each entry in the FAT is 4 bytes in size. Given a 100×106100 \times 10^6 bytes disk on which the file system is stored and data block size is 10310^3 bytes, the maximum size of a file that can be stored on this disk in units of 10610^6 bytes is _____.

Official answer and solution
Accepted answers
99.55 to 99.65
From
Official GATE 2014 answer key

Solution

Calculate total disk blocks, the storage overhead needed for FAT entries, and the remaining usable data blocks.

  1. Given Parameters:

    • Disk size D=100×106D = 100 \times 10^6 bytes.
    • Block size B=103B = 10^3 bytes.
    • Overhead per FAT entry = 44 bytes.
  2. Total Number of Disk Blocks:

    N=100×106103=105=100,000 blocks.N = \frac{100 \times 10^6}{10^3} = 10^5 = 100{,}000 \text{ blocks}.
  3. FAT Size (Overhead):
    In a File Allocation Table, each disk block corresponds to one FAT entry.

    Total FAT size=100,000×4 bytes=400,000 bytes=400×103 bytes.\text{Total FAT size} = 100{,}000 \times 4 \text{ bytes} = 400{,}000 \text{ bytes} = 400 \times 10^3 \text{ bytes}.
  4. Blocks Occupied by FAT:

    FAT blocks=400×103103=400 blocks.\text{FAT blocks} = \frac{400 \times 10^3}{10^3} = 400 \text{ blocks}.
  5. Remaining Data Blocks for File Storage:

    Available data blocks=100,000−400=99,600 blocks.\text{Available data blocks} = 100{,}000 - 400 = 99{,}600 \text{ blocks}.
  6. Maximum File Size:

    Max file size=99,600×103 bytes=99.6×106 bytes.\text{Max file size} = 99{,}600 \times 10^3 \text{ bytes} = 99.6 \times 10^6 \text{ bytes}.

    In units of 10610^6 bytes, the value is 99.699.6, which lies in the official range [99.55,99.65][99.55, 99.65].

Final answer

99.6

Common trap

Forgetting that the FAT table itself must reside on the disk and consumes data blocks, reducing available space for file data.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2014 Computer Science and Information Technology (CS) Session 2
Question
30 of 65, printed as CS Q.20
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.