retagged by
11,936 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

13.3k
views
6 answers
17 votes
Arjun asked Feb 12, 2020
13,290 views
Consider the following statements about process state transitions for a system using preemptive scheduling.A running process can move to ready state.A ready process can move to running ... III onlyI, II, and IV onlyI, II, III and IV only
14.5k
views
3 answers
19 votes
Arjun asked Feb 12, 2020
14,510 views
Each of a set of $n$ processes executes the following code using two semaphores $a$ and $b$ initialized to $1$ and $0$, respectively. Assume that $\text{count}$ ... .It ensures that at most $n-1$ processes are in CODE SECTION P at any time.
5.5k
views
1 answers
8 votes
Arjun asked Feb 12, 2020
5,518 views
Consider the following five disk five disk access requests of the form (request id, cylinder number) that are present in the disk scheduler queue at a given time. ... movement between servicing of $Q$ and $P$.$R$ is serviced before $P$.
10.8k
views
3 answers
14 votes
Arjun asked Feb 12, 2020
10,836 views
Consider the following set of processes, assumed to have arrived at time $0$. Consider the CPU scheduling algorithms Shortest Job First (SJF) and Round Robin (RR). For ... (in ms) of SJF and RR (round off to $2$ decimal places is_______