GATE / CS ARCHIVE

GATE CSE 2004 / QUESTION 47

Two-level paging effective instruction time

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

GATE 2004, Q47 2 marks · MCQ
Report issue

Virtual Memory & Paging

Question 47, GATE 2004: A two-level paging system has regular memory access time 150 ns and page-fault service time 8 ms. An average instruction uses 100 ns CPU time and two memory accesses. TLB hit ratio is 90%; page faults occur once per 10,000 instructions. What is effective average instruction time? TLB lookup time and caching of page-table levels are unspecified.
Options:
(A) 645 ns
(B) 1050 ns
(C) 1215 ns
(D) 1230 ns
Tap to enlarge
Your answer
Answer & solution

Answer: 1260 ns under literal two-level page-table model; no listed option (no official key was published)

1. Assuming negligible TLB lookup time and a true two-level page table, a TLB hit costs 150ns and a miss costs three memory accesses: two page-table reads plus the requested data access,450ns. Two accesses per instruction therefore cost 2(0.9×150+0.1×450)=360ns.

2. Add100ns CPU time and 8,000,000/10,000=800ns amortized fault service:1260ns. None of 645,1050,1215,1230 matches.

3. Option D=1230ns results from counting only TWO total memory accesses per TLB miss:100+2(0.9×150+0.1×300)+800. That requires a single-level translation model or an unstated cached first-level entry.

4. Treat the result as model-dependent rather than silently forcing D. Minor whether-fault-service-includes-retry conventions do not account for the 30ns discrepancy.

5. Teaching check: A true two-level TLB miss reads level 1, level 2 and data: three memory accesses. The page-fault rate is per instruction, so add the 800-ns average penalty once, not twice. The closest-looking listed value must not erase the extra translation read.

Original paper, page 7