The Gateway to Computer Science Excellence
+21 votes

Consider $6$ memory partitions of sizes $200$ $\text{KB}$, $400$ $\text{KB}$, $600$ $\text{KB}$, $500$ $\text{KB}$, $300$ $\text{KB}$and $250$ $\text{KB}$, where $\text{KB}$refers to $\text{kilobyte}$. These partitions need to be allotted to four processes of sizes $357$ $\text{KB}$, $210$ $\text{KB}$, $468$ $\text{KB}$, $491$ $\text{KB}$in that order. If the best-fit algorithm is used, which partitions are NOT allotted to any process?

  1. $200$ $\text{KB}$ and $300$ $\text{KB}$
  2. $200$ $\text{KB}$ and $250$ $\text{KB}$
  3. $250$ $\text{KB}$ and $300$ $\text{KB}$
  4. $300$ $\text{KB}$ and $400$ $\text{KB}$
in Operating System by Veteran (105k points)
edited by | 1.8k views

4 Answers

+24 votes
Best answer

Option (A) is correct because we have $6$ memory partitions of sizes $200 \ KB, 400 \ KB, 600 \ KB, 500 \ KB, 300 \ KB$ and $250 \ KB$ and the partition allotted to the process using best fit is given below:

$357 \ KB$ process allotted at partition $400 \ KB.$
$210 \ KB$ process allotted at partition $250 \ KB$
$468 \ KB$ process allotted at partition $500  \ KB$
$491 \ KB$ process allotted at partition $600 \ KB$

So, we have left only two partitions $200 \ KB$ and $300 \ KB$

by Active (5k points)
edited by
Answer A

BEST FIT :- We select smallest sufficient partition among free available partition

WORST FIT:-we select largest sufficient partition  among the free available partition

FIRST FIT :-we select first sufficient partition from the top of the memory

NEXT FIT :-we select first sufficient partition from the last of the memory

Alternate approach, For the best-fit strategy we can do this as well:

Arrange the given partitions in ascending order so we have






Now allocating the processes to blocks we have

200KB -

250KB - 210KB

300KB -

400KB - 357KB

500KB - 468KB

600KB - 491KB
So 200KB and 300KB are the two blocks which are left.

+9 votes
Ans A

Best fit policy is choose smallest big enough chunk of memory.
by Boss (13.5k points)

@Vikrant Singh

sir, how to understand that question is of Fixed partition or variable?

means holes created can be filled or not ?

0 votes
answer A
by Active (2.4k points)
0 votes
by (169 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,491 answers
100,672 users