GateAI
File Systems

GATE CSE 2026 Set 2 · Q53

NAT2 marksMedium

Time

To keep track of free blocks in a file system, one of the two approaches is generally used – using bitmaps (bit vectors) or using linked lists. Consider that the linked list approach is used to keep track of free blocks in a file system. Assume that the disk size is 16 GB, block size is 2 KB, and block numbers used are 32-bit long. A single pointer of size 4 bytes is used in each block of the list to point to the next block of the list. The number of blocks required to hold the free disk block numbers is ____________. (answer in integer)

Note: 1K=2101\text{K}=2^{10} and 1G=2301\text{G}=2^{30}

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 16417

File Systems

### Step 1: Calculate the total number of blocks on disk

Disk Size=16 GB=16×230 bytes\text{Disk Size} = 16\text{ GB} = 16 \times 2^{30}\text{ bytes}
Block Size=2 KB=2×210 bytes=2048 bytes\text{Block Size} = 2\text{ KB} = 2 \times 2^{10}\text{ bytes} = 2048\text{ bytes}
Total Number of Blocks=16×230 B2×210 B=8×220=8,388,608 blocks\text{Total Number of Blocks} = \frac{16 \times 2^{30}\text{ B}}{2 \times 2^{10}\text{ B}} = 8 \times 2^{20} = 8{,}388{,}608\text{ blocks}

---

### Step 2: Calculate the capacity of a single free list block

In each block holding free block numbers:

  • Block size:2048 bytes2048\text{ bytes}

  • Pointer to next block:4 bytes4\text{ bytes}

  • Space available for block numbers:2048−4=2044 bytes2048 - 4 = 2044\text{ bytes}

  • Size of each block number:32 bits=4 bytes32\text{ bits} = 4\text{ bytes}

Free block numbers stored per block=⌊20444⌋=511\text{Free block numbers stored per block} = \left\lfloor \frac{2044}{4} \right\rfloor = 511

---

### Step 3: Calculate the total blocks required

To store up to 8,388,6088{,}388{,}608 free block numbers:

Number of blocks required=⌈8,388,608511⌉=⌈16416.0626⌉=16417\text{Number of blocks required} = \left\lceil \frac{8{,}388{,}608}{511} \right\rceil = \left\lceil 16416.0626 \right\rceil = 16417

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This File Systems previous year question is Q53 of the GATE CSE 2026 Set 2 paper. Find more GATE CSE PYQs on File Systems in Operating Systems, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related File Systems PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

File Systems in GATE CSE

File Systems has 14 GATE CSE PYQs across 14 papers from 2011 to 2026. 7 of them are 2-mark NAT questions like this one, and it is the only one in GATE CSE 2026 Set 2.

How GATE tests File Systems

More from GATE CSE 2026 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2026 Set 2 · Q53 · NAT

To keep track of free blocks in a file system, one of the two approaches is generally used – using bitmaps (bit vectors) or using linked lists. Consider that the linked list approach is used to keep track of free blocks in a file system. Assume that the disk size is 16 GB, block size is 2 KB, and block numbers used are 32-bit long. A single pointer of size 4 bytes is used in each block of the list to point to the next block of the list. The number of blocks required to hold the free disk block numbers is … (answer in integer) Note: 1K=210 and 1G=230

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.