Given six memory partitions of 300 KB 600 KB 350 KB 200 KB 7

Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125 KB (in order), how would the first-fit, best-fit, and worst-fit algorithms place processes of size 115 KB, 500 KB, 358 KB, 200 KB, and 375 KB (in order)? Rank the algorithms in terms of how efficiently they use memory.

Solution

Okay so in

First Fit:- The First available Memory is allotted to the Process.

Best Fit:- The Memory in which least amount of size will be wasted or left over will be allotted.

Worst Case:- The Largest Memory will be allotted.

So, Applying the Algorithms

First Fit:-

Best Fit:-

Worst Fit:-

Here we can say that Best fit is the Best as it leaves the largest Holes after allotting the Space but comparing the runtime of the processes

Best Fit runs at time O(n)

First Fit runs in constant time O(1).

Thank You for using Chegg...

Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125 KB (in order), how would the first-fit, best-fit, and worst-fit algorithms place

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site