Skip to content
Official PYQ · 2014

GATE CS 2014 Set 2 Q20 — File Systems

Explain with AI
A FAT (file allocation table) based file system is being used and the total overhead of each entry in the FAT is 44 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 _________.
View worked solution

Answer: 99.55 : 99.65

To find the maximum size of a file that can be stored on the disk, we must account for the space occupied by the File Allocation Table (FAT) on the same disk.

Step-by-Step Derivation:

Let NN be the total number of data blocks (clusters) on the disk.

  • Data Block Size: 10310^3 bytes
  • FAT Entry Size per Block: 44 bytes
  • Total Disk Size: 100×106100 \times 10^6 bytes

The total disk space is shared between the FAT and the actual data blocks:

Total Disk Size=FAT Size+Data Blocks Size\text{Total Disk Size} = \text{FAT Size} + \text{Data Blocks Size} Total Disk Size=(N×4)+(N×103)=N×1004 bytes\text{Total Disk Size} = (N \times 4) + (N \times 10^3) = N \times 1004 \text{ bytes}

Now, solve for NN:

N×1004=100×106N \times 1004 = 100 \times 10^6 N=100×1061004≈99601.59N = \frac{100 \times 10^6}{1004} \approx 99601.59

Since the number of blocks must be an integer, we take the floor value:

N=99601 blocksN = 99601 \text{ blocks}

Maximum File Size:

The maximum size of a single file is achieved when it occupies all the available data blocks on the disk:

Maximum File Size=N×Data Block Size\text{Maximum File Size} = N \times \text{Data Block Size} Maximum File Size=99601×103 bytes=99.601×106 bytes\text{Maximum File Size} = 99601 \times 10^3 \text{ bytes} = 99.601 \times 10^6 \text{ bytes}

In units of 10610^6 bytes, the maximum file size is 99.699.6 (which lies within the range of 99.5599.55 to 99.6599.65).

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

Published
Report a correction
Keep exploringMore File Systems questions