A 1000 Kbyte memory is managed using variable partitions but no compaction. It…

1996

A 1000 Kbyte memory is managed using variable partitions but no compaction. It currently has two partitions of sizes 200 Kbytes and 260 Kbytes respectively. The smallest allocation request in Kbytes that could be denied is for?

Answer: B. 181In dynamically-partitioned memory with no compaction, n allocated partitions split the unallocated space into at most n + 1 disjoint free holes. By the…

  1. A.

    151

  2. B.

    181

  3. C.

    231

  4. D.

    541

Attempted by 131 students.

Show answer & explanation

Correct answer: B

In dynamically-partitioned memory with no compaction, n allocated partitions split the unallocated space into at most n + 1 disjoint free holes. By the Pigeonhole Principle, when a total free space F is divided across h holes, at least one hole must be at least F divided by h in size, so a request of that size or smaller is always guaranteed a home, while a request one Kbyte larger can, in the worst case, be arranged so that it exceeds every individual hole and gets denied.

  1. Total free memory = 1000 minus 200 minus 260 = 540 Kbytes.

  2. With 2 allocated partitions (n = 2), the free space can be split into at most n + 1 = 3 disjoint holes.

  3. By the Pigeonhole Principle, dividing 540 Kbytes across 3 holes guarantees at least one hole of size at least 540 divided by 3 = 180 Kbytes, so a request of 180 Kbytes always fits somewhere.

  4. A request of 181 Kbytes, however, can be denied: if the 540 Kbytes is fragmented into three holes of 180 Kbytes each, no single hole can satisfy a 181 Kbyte request.

Check the worst-case layout directly: three holes of 180 + 180 + 180 = 540 Kbytes is a valid fragmentation of the free memory, and each hole individually is smaller than 181 Kbytes, confirming that 181 Kbytes is indeed deniable while 180 Kbytes (and everything below it) is always guaranteed to fit.

Hence, 181 Kbytes is the smallest allocation request that could be denied.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…