GATE / CS ARCHIVE

GATE CSE 1996 / QUESTION 2.18

Worst external fragmentation

Operating Systems · Memory Allocation & Segmentation · Full GATE CSE 1996 paper

GATE 1996, Q2.18 2 marks · MCQ
Report issue

Memory Allocation & Segmentation

Question 2.18, GATE 1996: A 1000-Kbyte variable-partition memory has two allocated partitions of 200 and 260 Kbytes, with no compaction. What smallest integer-Kbyte request could be denied?
Tap to enlarge
Your answer
Answer & solution

Answer: B: 181 Kbytes (no official key was published)

Free space totals 1000−200−260=540 Kbytes. Two occupied contiguous partitions divide linear memory into at most three free holes. Therefore at least one hole has size at least 540/3=180 Kbytes, so every request of at most 180 Kbytes can fit somewhere. This bound is attainable by arranging hole 180,allocation 200,hole 180,allocation 260,hole 180. In that layout a request of 181 Kbytes fails despite sufficient total free memory. Thus 181 is the smallest integer request that could fail; the question asks a possible worst layout, not a guarantee for every layout.

Original paper, page 6