Skip to content
GATEiit

GATE CSE 2026 Session 2 Q55: Small holes left after best-fit allocation of two processes

Question

Consider contiguous allocation of physical memory to processes using variable partitioning scheme. Suppose there are 8 holes in the memory of sizes 20 KB, 4 KB, 25 KB, 18 KB, 7 KB, 9 KB, 15 KB, and 12 KB. Assume that no two holes are adjacent. Two processes P1 of size 16 KB and P2 of size 9 KB arrive in that order, and they are allocated memory using the best-fit technique. After allocating space to P1 and P2, the number of holes of size less than 8 KB is ____________. (answer in integer)

Note: 1K=2101\text{K} = 2^{10}

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 3 (official GATE 2026 final answer key)

Concept used: Best fit picks the smallest hole that is large enough and leaves the remainder as a hole.

First step: P1 (16 KB) goes into the 18 KB hole, leaving 2 KB; then place P2 (9 KB) and list the remaining hole sizes.

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 2026 Session 2 CS question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key