GATE / CS ARCHIVE

GATE CSE 2011 / QUESTION 20

Effective memory time with rare page faults

Operating Systems · Virtual Memory & Paging · Full GATE CSE 2011 paper

GATE 2011, Q20 1 mark · MCQ
Report issue

Virtual Memory & Paging

Question 20, GATE 2011: Memory access takes 20 ns on average, a page fault takes 10 ms to service, and one page fault occurs per 10^6 memory accesses. Find the effective access time.

(A) 21 ns
(B) 30 ns
(C) 23 ns
(D) 35 ns
Tap to enlarge
Your answer
Answer & solution

Official answer: B

The fault probability is 10−6 and 10ms=107 ns. Average fault overhead contributes 10 ns per access, in addition to the 20 ns memory time, giving approximately 30 ns, B. If fault service is taken as a replacement rather than added time, the weighted result 29.99998 ns has the same rounded answer.

Convert all units before averaging: 1 ms=106 ns, so the fault penalty is ten million nanoseconds. Although the event is rare, multiplying that large penalty by 1/1000000 adds 10 ns to the average. This is half the normal access time, so ignoring faults because they are rare would be a large relative error. Conversely, adding the full 10 ms to every access would wrongly assume every reference faults.

Original paper, page 5 · Answer key