(d + B/P + (B/P)² + (B/P)³) × B with d direct pointers
FAT size
(number of blocks on the disk) × (entry size)
Bit-map size
number of blocks bits = blocks / 8 bytes
Blocks for a file of S bytes
⌈S / B⌉
Entry bits needed
at least ⌈log₂(number of blocks)⌉ bits per pointer
What GATE asks from this
Question types seen repeatedly in past papers. More stars means more frequent.
★★★
Maximum file size with direct and indirect pointers
Compute B/P, then add each level; be careful with how many direct pointers.
★★★
How many disk accesses to reach byte k of a file
Count the indirect blocks that must be read before the data block.
★★★
Compare allocation methods
Which has external fragmentation, which supports direct access, which is robust.
★★★
Hard link versus soft link
Link counts, deleting the original, crossing file systems.
Ratings are approximate, based on recurring patterns in past GATE CSE papers.
Previous year questions
5 real questions from the official GATE CSE papers (2012 to 2025), newest first, each with the official answer key and a worked solution. Questions are the property of the GATE organising institutes; this copy is for your personal study.
5 questions · 0 correct of 0 attempted · marks 0 / 9
Year:
GATE 2025 CS1 · Q51NAT2 marks
A disk of size 512M bytes is divided into blocks of 64K bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves 4 bytes to store the pointer to the next data block. The link part of the last data block contains a NULL pointer (also of 4 bytes). Suppose a file of 1M bytes needs to be stored in the disk. Assume, 1K = 210 and 1M = 220. The amount of space in bytes that will be wasted due to internal fragmentation is ______.
GATE 2022 · Q63NAT2 marks
Consider two files systems A and B, that use contiguous allocation and linked allocation, respectively. A file of size 100 blocks is already stored in A and also in B. Now, consider inserting a new block in the middle of the file (between 50th and 51st block), whose data is already available in the memory. Assume that there are enough free blocks at the end of the file and that the file control blocks are already in memory. Let the number of disk accesses required to insert a block in the middle of the file in A and B are nA and nB, respectively, then the value of nA + nB is ______.
GATE 2021 Set 1 · Q15MSQ1 mark
Consider a linear list based directory implementation in a file system. Each directory is a list of nodes, where each node contains the file name along with the file metadata, such as the list of pointers to the data blocks. Consider a given directory foo. Which of the following operations will necessarily require a full scan of foo for successful completion?
One or more options may be correct. Select all that apply, then submit.
GATE 2019 Set 2 · Q42NAT2 marks
The index node (inode) of a Unix-like file system has 12 direct, one single-indirect and one double-indirect pointers. The disk block size is 4 kB, and the disk block address is 32-bits long. The maximum possible file size is (rounded off to 1 decimal place) ______ GB.
GATE 2012 Code A · Q41MCQ2 marks
A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is
Common traps
Linked allocation has no external fragmentation but slow direct access and wasted pointer space in every block.
A hard link cannot cross file systems; a soft link can, and may dangle.
The number of pointers in a block uses the pointer size, not the block-number size you want to address.
Directory entries do not hold data: rename and move inside one file system are cheap.