A free list contains three memory areas of sizes 6 KB, 15 KB and 12 KB. The…
2021
A free list contains three memory areas of sizes 6 KB, 15 KB and 12 KB. The next three memory requests are for 10 KB, 2 KB and 14 KB. Which of the memory allocation strategy would be able to accommodate all the three requests?
- A.
Worst Fit
- B.
Best Fit
- C.
Next Fit
- D.
First Fit
Attempted by 173 students.
Show answer & explanation
Correct answer: B
Request 10 KB: Allocated to the smallest block that fits (12 KB). Remaining: [6 KB, 15 KB, 2 KB].
Request 2 KB: Allocated to the smallest block that fits (2 KB). Remaining: [6 KB, 15 KB, 0 KB].
Request 14 KB: Allocated to the smallest block that fits (15 KB). Remaining: [6 KB, 1 KB, 0 KB].
Result: All requests accommodated.