Question

Consider a multi-partition memory mgmt system that may use any of the FF, BF, or WF...

Consider a multi-partition memory mgmt system that may use any of the

FF, BF, or WF allocation schemes. Suppose that we added a "magic" sorting

routine that could sort the free space list by size, either large to small

or small to large, with almost no effort(a neat trick). Would you sort the

list large blocks to small or the other way around? Explain. (Hint: what is

the impact on the three "fit" methods?)


0 0
Add a comment Improve this question Transcribed image text
Answer #1

First Fit : Allocate first large enough block , which can accommodate the process. It includes less searching.

Best Fit : Find a smallest block that can accommodate process and assign it to process. Have to go through whole list of free blocks.

Worst Fit : Find a largest block in memory that can accommodate process and assign process to it. In this also, whole list has to be traversed.

if we sort free block list into small to large manner:

1) for worst fit, whole list has to be traversed to reach largest block.

2) for best fit, in worst case whole list might have to traversed. For best fit and worst fit both algorithm, whole list has to be traversed in worst case.

If free block list is sorted in large to small manner:

1) for worst fit, size of first block will decide if the process can be accommodated in memory or not which takes constant time.

2) In case of Best fit, in worst case, whole list might have to be traversed to find block.

Hence sorting list in large to small is better than the other way around.

Add a comment
Know the answer?
Add Answer to:
Consider a multi-partition memory mgmt system that may use any of the FF, BF, or WF...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT