Question: UGC NET 2013 and GATE 2011
Let the page fault service time be 10 ms in a computer with average memory access time being 20ns. If one page fault is generated for every memory access time for the memory?
a) 21 ns b) 30 ns c) 23 ns d) 35 ns
You should know:
Before seeing the solution please follow the previous chapter: Effective Memory Access Time (EMAT) with Page Fault rate
Solution:
As we know,
Now, we can use optimize formula EMAT = p(pf) + m which same as above
Here memory access time (m) = 20ns, page fault service time = 10ms and page fault rate =
So, Effective Memory Access Time (EMAT) for this above example is 30ns.
So, option (b) is correct.
Question: GATE 2000
Suppose the time to service a page fault is on average 10 milliseconds, while a memory access takes 1 microsecond. Then a 99.99% hit ratio results in an average memory access time of
(A) 1.9999 milliseconds
(B) 1 millisecond
(C) 9.999 microseconds
(D) 1.9999 microseconds
You should know:
Before seeing the solution please follow the previous chapter: Effective Memory Access Time (EMAT) with Page fault rate
Solution:
As we know,
Now, we can use optimize formula EMAT = p(pf) + m which same as above
Here memory access time (m) = 1μsec, page fault service time = 10ms and hit ratio = 99.9% so, miss ratio or page fault ratio = (1 - 99.99%) = 0.01%, so page fault rate 0.01/100 = 0.0001 i.e. .
But there is no option to match with answer 2 microseconds.
Though the calculated answer 2 microseconds is correct, so can take the nearest option which is match with the answer. Here it is 1.9999 microseconds.
So, the correct option is (D)
Note: If you get this type of question, you may not get the exact option according to your option then we can take the nearest one as an option.
Reason for this mismatch with option:
As we know,
But page fault service time is very high, main memory access time is too little compared to page fault service time, that’s why some people neglect main memory access time when considering page fault and only consider the page fault service time as a total time.
So,
Now, if we put the given data you will get effective memory access time exactly as an option. Let try.
Now, the answer matches our option (D).
Note: But we should consider main memory access time also. So, the previous method more appropriate than the last one.