retagged by
11,196 views
24 votes
24 votes

Consider allocation of memory to a new process. Assume that none of the existing holes in the memory will exactly fit the process’s memory requirement. Hence, a new hole of smaller size will be created if allocation is made in any of the existing holes. Which one of the following statement is TRUE?

  1. The hole created by first fit is always larger than the hole created by next fit.
  2. The hole created by worst fit is always larger than the hole created by first fit. 
  3. The hole created by best fit is never larger than the hole created by first fit.
  4. The hole created by next fit is never larger than the hole created by best fit.
retagged by

4 Answers

Best answer
28 votes
28 votes

Best fit will search for the smallest block which is able to accommodate the request. So, the hole created by the Best Fit is always less than or equal to the hole created using any other method.

Worst fit search for the biggest possible block which is able to accommodate the request. It might be the case that block biggest possible block may be in the first block and both worst and first fit select the same block.

So, we can't say that hole formed by worst fit is always greater than first. The size of the hole can be same too. (B) is false

Ans: (C) Hole created by the best fit is never larger than the hole created by first fit,

The hole created by the Best Fit is equal to the hole created by first fit when the first fit happens to select the smallest block which can accommodate the required size.

selected by
6 votes
6 votes
first fit and last fit may result same size hole.

first fit and worst fit may result same size hole.

the hole created by next fit may be larger than best fit.

BUT best fit creates the holes which are less size or same size than any other scheme.

Option C is correct.
0 votes
0 votes
Memory allocation by creating holes by BEST FIT Algorithm is always smaller than or equal to the sizes of holes created by other methods  such as FIRST FIT,NEXT FIT and WORST FIT. Again we know that BEST FIT is worst performer.

Hence in this case the option C is true.
0 votes
0 votes

The hole created by best fit is never large than that of first fit,

But this does not necessarily mean that best fit is the best amongst all the algorithms

In depends on case to case.

But this condition holds true in every case.

See the image below.

Answer:

Related questions