Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

11) Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 1

ID: 3533246 • Letter: 1

Question

11) Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125 KB (in order), how would the first-fit, best-fit, and worst-fit algorithms place processes of size 115 KB, 500 KB, 358 KB, 200 KB, and 375 KB (in order)? Rank the algorithms in terms of how efficiently they use memory.

21) The BTV operating system has a 21-bit virtual address, yet on certain embedded devices, it has only a 16-bit physical address. It also has a 2-KB page size. How many entries are there in each of the following?

a) A conventional, single-level page table.

b) An inverted page table.

Explanation / Answer

11)

First fit:

115 KB -> 300KB

500 KB -> 600KB

358 KB -> 750KB

200 KB -> 350KB

375 KB -> 750KB


Best fit:

115 KB -> 125KB

500 KB -> 600KB

358 KB -> 750KB

200 KB -> 200KB

375 KB -> 750KB


Worst fit:

115 KB -> 750KB

500 KB -> 750KB

358 KB -> 600KB

200 KB -> 350KB

375 KB -> Internal fragmentation. waits for 750KB or 600KB memory to get free.


Efficiency

Best fit > First fit > Worst fit


21)

Entries on page table = 2^21 / 2^11

= 2^10 or 1KB entries on the page table


In inverted page table: 2^16 / 2^11

= 2^5 = 32 entries

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote