Skip to content
GATEiit

GATE CSE 2025 Session 1 Q51: Internal fragmentation for a 1 MB file with linked allocation

Question

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=2101\text{K} = 2^{10} and 1M=2201\text{M} = 2^{20}. The amount of space in bytes that will be wasted due to internal fragmentation is ______. (Answer in integer)

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 65468 (official GATE 2025 final answer key)

Concept used: With linked allocation each block holds (block size − pointer size) bytes of data; the last block's unused part is internal fragmentation.

First step: Each block stores 65536−4=6553265536 - 4 = 65532 data bytes, so the file needs ⌈1048576/65532⌉\lceil 1048576 / 65532 \rceil blocks.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2025 Session 1 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key