6,135 views
1 votes
1 votes

Consider a swapping system in which memory consists of the following hole sizes in memory order: $10\: MB, 4\: MB, 20\: MB, 18\: MB, 7\: MB, 9\: MB, 12\: MB,$ and $15\: MB$. Which hole is taken for successive segment requests of

  1. $12\: MB$
  2. $10\: MB$
  3. $9\: MB$ 

for first fit? Now repeat the question for best fit, worst fit, and next fit.

2 Answers

1 votes
1 votes

Answer:

First Fit: 

It will take in the following order: $20 ~\text {MB}, 10\; \text {MB}, 18\;\text{MB}, 9\text{MB}$

Best Fit: 

Order: $12\; \text{MB}, 10 \; \text{MB},\; 9\;\text{MB}$

Worst Fit: 

Order:  $20\;\text{MB}, 18~\text{MB}, 15\;\text{MB}.$

Next Fit:

Order: $20\;\text{MB}, 18\;\text{MB}, 9\text{MB}$

 

 

 

edited by
0 votes
0 votes

First Fit Order: 20,10,18.

Best Fit Order: 12,10,9.

Worst Fit Order: 20,18,15.

Next Fit Order: 20,18,9.

Related questions

1 votes
1 votes
0 answers
2
admin asked Oct 26, 2019
596 views
Using the page table of Fig. $3-9,$ give the physical address corresponding to each of the following virtual addresses:$20$$4100$$8300$
0 votes
0 votes
0 answers
3
admin asked Oct 26, 2019
349 views
For each of the following decimal virtual addresses, compute the virtual page number and offset for a $4-KB$ page and for an $8 KB$ page$:20000, 32768, 60000.$
1 votes
1 votes
1 answer
4