1
66kviews
Given memory partition of 100KB,500KB,200KB and 600KB(in order), how would each of the first fit , best fit and worst fit algorithms place processes of 212KB ,417KB,112KB and 426KB(in order)?

Which algorithm makes the most efficient use of memory?

1 Answer
5
15kviews

First fit

212 K is put in 500 K partition.

417 K is put in 600 K partition.

112 K is put in 288 K partition. (New partition 288 K = 500 K - 212 K)

426 K must wait.

Best-fit

212 K is put in 300 K partition.

417 K is put in 500 K partition.

112 K is put in 200 K partition.

426 K is put in 600 K partition.

Worst-fit

212 K is put in 600 K partition.

417 K is put in 500 K partition.

112 K is put in 388 K partition. (600 K - 212 K)

426 K must wait.

In this example Best-fit is the best solution.

Please log in to add an answer.