Consider memory partitions of sizes , , , , and , where refers to . These partitions need to be allotted to four processes of sizes , , , in that order. If the best-fit algorithm is used, which partitions are NOT allotted to any process?
View worked solution
Answer: A
The Best-Fit memory allocation policy assigns a process to the smallest available memory partition that is large enough to accommodate it. This minimizes the leftover wasted space (internal fragmentation) in the allocated partition.
Let the initial set of available partition sizes be:
We allocate the processes of sizes , , , and sequentially:
-
Process 1 ():
- Partitions large enough: , , .
- The smallest among these is .
- Allocation: partition is allocated.
-
Process 2 ():
- Partitions large enough: , , , .
- The smallest among these is .
- Allocation: partition is allocated.
-
Process 3 ():
- Partitions large enough: , .
- The smallest among these is .
- Allocation: partition is allocated.
-
Process 4 ():
- Partitions large enough: .
- Allocation: partition is allocated.
After allocating all four processes, the partitions that remain unallocated are:
Thus, the correct option is A.
Free practice · Your answers on this page are not saved.
