6,503 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

356
views
0 answers
0 votes
admin asked Oct 26, 2019
356 views
The Intel $8086$ processor did not have an MMU or support virtual memory. Nevertheless, some companies sold systems that contained an unmodified $8086$ CPU and did ... they did it. (Hint: Think about the logical location of the MMU.)
628
views
0 answers
1 votes
admin asked Oct 26, 2019
628 views
Using the page table of Fig. $3-9,$ give the physical address corresponding to each of the following virtual addresses:$20$4100$8300$
378
views
0 answers
0 votes
admin asked Oct 26, 2019
378 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.$
516
views
1 answers
1 votes
admin asked Oct 25, 2019
516 views
What is the difference between a physical address and a virtual address?