9

I'm reading operating system concepts essisentals 8th edition. When the author goes over contiguous memory allocation and worst fit the author states "Allocate the largest hole. Again, we must search the entire list unless it is sorted by size. This strategy produces the largest leftover hole, which may be more useful than the smaller leftover hole from a best-fit approach."

So my question, when is leaving the biggiest leftover hole a better approach?

2
  • 3
    Your main question asks when worst fit is useful, but then you say your question is when leaving a smaller hole is better, which is not what worst fit does. Mar 27, 2013 at 0:45
  • thanks for catching that Mar 27, 2013 at 1:14

1 Answer 1

9

Leaving the biggest leftover hole could be a better approach if all the processes submitted tend to be around the same size.

In that case, if you have a large free block (say 50MB) and most of the processes submitted tend to be smaller than that (say 10MB), it would actually be better to put them in this big block so that you can use the leftover space better, rather than put them in a barely bigger block (maybe 11-15MB) which would leave some small unusable space.

I don't know if it's actually used anywhere though.

Have a read (and a play) of this: http://research.cs.vt.edu/AVresearch/MMtutorial/WorstFit.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.