GATE - 2004 | OS | Consider a system with a two-level paging scheme in which a regular

GATE - 2004 | OS | Consider a system with a two-level paging scheme in which a regular
Posted on 21-02-2022

GATE - 2004 [Operating System]

Question

Consider a system with a two-level paging scheme in which a regular memory access takes 150 nanoseconds, and servicing a page fault takes 8 milliseconds. An average instruction takes 100 nanoseconds of CPU time, and two memory accesses. The TLB hit ratio is 90%, and the page fault rate is one in every 10,000 instructions. What is the effective average instruction execution time?

A

645 nanoseconds

B

1050 nanoseconds

C

1215 nanoseconds

D

2060 nanoseconds

  

Solution:

Option (D) is Correct.

Effective average instruction time = CPU time + 2 EMAT
= 100ns + 2EMAT


Now lets calculate EMAT,
EMAT = TLB + miss rate × 2 × 150ns + 150ns + 1/10000 × 8ms
= 0 + 0.1 × 300ns + 150ns + 800ns
= 980ns


∴ Effective average instruction time,
= 100ns + 2 × 980ns
= 2060ns

Thank You