The method of placing a program in the smallest available hole in the memory…

2009

The method of placing a program in the smallest available hole in the memory is called _________.

  1. A.

    best – fit

  2. B.

    first – fit

  3. C.

    worst – fit

  4. D.

    buddy

Attempted by 3 students.

Show answer & explanation

Correct answer: A

Concept: When a new process needs contiguous memory, the operating system keeps a list of free blocks ("holes") and must choose which hole to allocate from. The standard placement strategies for this choice are:

  • First Fit — scan the hole list from the start and allocate the first hole that is large enough.

  • Best Fit — scan every hole and allocate the one whose size leaves the least leftover space, i.e. the smallest hole that is still large enough.

  • Worst Fit — scan every hole and allocate the largest one available, leaving the biggest possible leftover.

  • Buddy System — repeatedly split memory into power-of-two halves ("buddies") until a block just large enough remains, merging freed buddies back on release.

Application: The stem describes a strategy that always places the program in the smallest hole among all the holes that are big enough to hold it. That is exactly the defining behaviour of the Best Fit strategy — it must examine the entire free list (or a size-sorted structure) before it can be sure no smaller sufficient hole exists.

Cross-check: First Fit would stop at the first sufficient hole without comparing sizes, so it does not guarantee the smallest one. Worst Fit deliberately picks the opposite extreme — the largest hole. Buddy System allocates by rounding the request up to the next power of two, not by scanning for the size-minimal hole. Only Best Fit matches "smallest available hole."

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…