Consider a swapping system that uses pure segments Memory co
Consider a swapping system that uses pure segments. Memory consists of the following hole sizes in memory order: 9KB, 5KB, 15 KB, 17 KB, and 12 KB. Which hole is taken for successive segment requests of 12 KB, 16 KB, 14 KB, 7 KB for the following? (If it cannot fit, then indicate that.) a) First fit b) Best fit c) Worst fit (Note that for a given request, worst fit means that you find the largest hole - i.e. the worst fit.)
Solution
First fit
Request Hole taken
12KB 15KB
16KB 17KB
14KB Cannot fit
7KB 9KB
Best fit
Request Hole taken
12KB 12KB
16KB 17KB
14KB 15KB
7KB 9KB
Worst Fit
Request Hole taken
12KB 17KB
16KB Cannot fit
14KB 15KB
7KB 9KB
