Algorithms like first-fit, best-fit, and worst-fit are used for which of the operating...
Qualcomm technical mcq question, verified with a worked answer. Free to practise - no sign-up.
Algorithms like first-fit, best-fit, and worst-fit are used for which of the operating system concepts given in options?
Show answer & explanation
First-fit, best-fit, and worst-fit are placement algorithms used in contiguous memory allocation to find suitable memory blocks for processes. These strategies determine how to assign a single continuous block of memory to a process, whereas non-contiguous allocation uses different methods (paging, segmentation) that don't require contiguous blocks. Deadlocks and swapping are unrelated OS concepts.
Step-by-step Derivation:
Contiguous memory allocation requires finding a contiguous block large enough for a process. The three placement algorithms address this:
- First-fit: Allocate the first block large enough
- Best-fit: Allocate the smallest block that fits (minimizes wasted space)
- Worst-fit: Allocate the largest available block
These are placement strategies specific to contiguous allocation. Non-contiguous allocation (paging, segmentation) doesn't use these algorithms. Deadlocks involve resource contention and circular waiting, unrelated to memory placement. Swapping moves entire processes to/from disk and doesn't use these selection strategies.