Dynamic storage allocation: In which placement strategy is a program loaded into the largest available free hole (block) in main memory?

Difficulty: Easy

Correct Answer: worst fit

Explanation:


Introduction / Context:
Dynamic storage allocation policies decide where to place a new process or segment in main memory. Different strategies trade off external fragmentation, search time, and future flexibility. Recognizing each strategy by its rule is vital for OS memory management questions.



Given Data / Assumptions:

  • Memory consists of variable-sized free holes.
  • A request arrives for a block of a certain size.
  • The strategy determines which hole is chosen.


Concept / Approach:

First fit picks the first hole large enough. Best fit chooses the smallest hole that is big enough, trying to minimize leftover waste. Worst fit chooses the largest hole available, aiming to leave sizeable remainders that might accommodate future requests better (though this can increase fragmentation in practice). Buddy systems split memory in powers of two and are not a simple “largest-hole” choice.



Step-by-Step Solution:

Identify the rule described: place into the largest free block.Map to known strategies: “largest hole” corresponds to worst fit.Confirm that best fit is “smallest adequate hole” and first fit is “first adequate hole”.Therefore, select worst fit.


Verification / Alternative check:

Standard OS references define worst fit exactly as using the largest available hole, distinguishing it from first and best fit.



Why Other Options Are Wrong:

  • best fit: Chooses the smallest adequate hole, not the largest.
  • first fit: Chooses the first adequate hole in address order.
  • buddy: Splits from powers-of-two blocks, not a hole-choice rule like “largest”.
  • None of the above: Incorrect because worst fit matches.


Common Pitfalls:

Confusing best fit with worst fit; assuming worst fit always reduces fragmentation (results vary by workload); overlooking search overhead differences among strategies.



Final Answer:

worst fit

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion