Assume we have a demand-paged memory. The page table is held in registers. It takes 15 milliseconds to service a page fault if an empty page is available or the replaced page is not modified and 25 milliseconds if the replaced page is modified. Memory access time is 100 nanoseconds. Assume that the page to be replaced is modified 80 percent of the time. What is the maximum acceptable page-fault rate for an effective access time of no more than 200 nanoseconds.
Given that page table is held in registers.
Time to service a page fault = 15ms = 15*10^6 ns
Time to service page fault if the replaced page is modified = 25ms=25*10^6ns
If the page table is not available in registers then memory will be accessed, whose access time= 100ns
Page to be replaced is modified m=80% of the time.
Effective memory access time should not be more than 200ns.
We need to find page fault rate. Let page fault rate is p.
Effective memory access time = page falut rate *((m*service time of modified page)+(1-m)*page fault service time))+(1-page fault rate)*memory access time
lets substitute the values to find maximum p:
200 = p*(0.8*25*10^6+0.2*15*10^6)+(1-p)*100
200 = p*(20+3)*10^6 + (1-p)*100
200 = 23*10^6*p + 100 - 100p
100 = (23*10^6 - 100)* p
p = 100/22999900 = 0.00000435 = 0.000435%
Hence the maximum acceptable page fault rate is 0.000435%
Get Answers For Free
Most questions answered within 1 hours.