Answer is B. 181KB
Explanation:
As mentioned by @Arjun sir, to get the smallest allocation request that could be denied, we have to minimize the maximum of the hole partition (that is free memory blocks), let's see why.
First we have to note that we are using Variable Partitioning method without compaction,
Variable Partitioning:
i. the partitions are of variable length and number, AND
ii. When a process is brought into main memory, it is allocated exactly as much memory as it requires and no more.
In compaction we realign the scattered holes to one end of memory, so that a larger hole can be created.
(Initially whole memory is a hole, i.e. free memory, then a process comes and it is allocated exactly the needed space, which creates a partition. In this question we can safely assume that the two given partitions of 200KB and 260KB are allocated to two processes, because otherwise it will all be one single hole of 1000KB and the answer to the question would be 1001KB)
Now let's see all the possible cases:
CASE 1.
If 200KB and 260KB are contiguous, from the beginning of the memory (obviously after the OS partition), then hole has a size of 540KB, so any process asking upto 540KB can be allocated.
CASE 2.
If 200KB and 260KB are continguous but somewhere in the middle of the memory, then we have two holes left. Hole1 and Hole2 (Refer the image below). If the size of these holes are not equal, say Hole1 = 300KB and Hole2 = 240KB then processes asking for memory upto 300KB can be allocated.
But if we keep hole sizes equal, we can see that Hole 1 = Hole 2 = 270KB, thus maximum 270 KB only can be allocated.
CASE 3
Arguing in a similar manner as in case 2, we can see that size of all three holes must be equal (i.e. 180KB), otherwise we'll have a hole which will allow a process needing more than 180KB to get allocated.
So 181 KB is the smallest allocation request that can be denied.
Wrong reasoning to get 151 KB:
Someone mentioned that if we order in the following way:
200-260-150-150-150-90 [Wrong division for variable partitions, the order looks like fixed partitions]
we can get the answer as 151KB.
The problem here is that it's given in the question that there are only two partitions, i.e., two processes are allocated space in main memory. So rest space is free memory, i.e., a hole.
So if 200 and 260 are allocated contiguously from the beginning (Or end), we have a hole of 540KB and any process needing memory upto 540 KB can be allocated.For this case the correct ordering would be: 200KB-260KB-540KB or 540KB-200KB-260KB