1. Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB (i
ID: 675225 • Letter: 1
Question
1. Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB (in that order), how would the first-fit, best-fit, and worst-fit algorithms place processes of 212 KB, 417 KB, 112 KB, and 426 KB (in that order)? which algorithm makes the most efficient use of memory? (Assume partitions are fixed in size) 2.Consider a paging system with the page table stored in memory. a.) If a memory reference takes 200 nanoseconds, how long does a paged memory refrence take? b.) If we add TLBs, and 75 percent of all page-table references are found in the TLBs, what is the effective memory reference time? (Assume that finding a page-table entry in the TLBs takes zero time, if the entry is there.)
Explanation / Answer
1)
a) First-fit
First-fit would allocate in the following manner:
b) Best-fit
Best-fit would allocate in the following manner:
c) Worst-fit
Worst-fit would allocate in the following manner:
d) Which algorithm makes the most efficient use of memory?
2) a) 2 memory accesses: page lookup followed by actual access => 2*200ns = 400ns
b) 75% * TLB hit-time + 25% * TLB miss-time = 75% * 200ns + 25% * 400ns = 250ns
The first-fit algorithm selects the first free partition that is large enough to accommodate the request.First-fit would allocate in the following manner:
- 212 KB => 500 KB partition, leaves a 288 KB partition
- 417 KB => KB partition, leaves a 183 KB partition
- 112 KB => 288 KB partition, leaves a 176 KB partition
- 426 KB would not be able to allocate, no partition large enough!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.