Skip to main content

GATE CSE 2014Operating System › I/O, Disk Scheduling & File SystemsVerified

GATE CSE 2014 PYQ: A FAT (file allocation table) based file system is being used and the total overhead of each entry in the…

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 _________.

    Answer

    99.6

    Approach

    Model the disk as a collection of fixed-size blocks. Every data block requires one entry in the FAT, and each FAT entry occupies 4 bytes. These FAT entries themselves consume space on the same disk. Therefore, the largest possible single file is the total disk space minus the space needed for the FAT.

    The FAT must have one entry per data block, so its total size is fixed at \(0.4\times10^6\) bytes. The remaining disk space is available for file data, giving \(99.6\times10^6\) bytes.

    Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.