GATE - 2020 | OS | Consider a paging system that uses a 1-level page table residing in main

GATE - 2020 | OS | Consider a paging system that uses a 1-level page table residing in main
Posted on 08-02-2022

GATE - 2020 [Operating System]

Question:

Consider a paging system that uses a 1-level page table residing in main memory and a TLB for address translation. Each main memory access takes 100 ns and TLB lookup takes 20 ns. Each page transfer to/from the disk takes 5000 ns. Assume that the TLB hit ratio is 95%, page fault rate is 10%. Assume that for 20% of the total page faults, a dirty page has to be written back to disk before the required page is read in from disk. TLB update time is negligible. The average memory access time in ns (round off to 1 decimal places) is ______.

Solution:

M=100ns
T=20ns
D=5000ns
h=0.95
p=0.1, 1-p=0.9
d=0.2, 1-d=0.8
EMAT = h×(T+M)+(1-h)[(1-p)×2M+p[(1-d)[D+M]+d(2D+M)]+T]
          

= 0.95×(20+100)+(1-0.95)[(1-0.1)×200+(0.1)[(1-0.2)[5000+100]+(0.2)(10000+100)]+20]           

= 154.5ns

---------------------------------------------

Given,

M = 100 ns

T = 20 ns

D = 5000 ns 

h = 0.95 

p = 0.1, (1-p) = 0.9 

d = 0.2, (1-d) = 0.8

Therefore, average memory access time,

= h×(T+M) + (1-h)[(1-p)×2M + p[(1-d)[D+M] + d(2D+M)] + T]

= 0.95×(20+100) + (1-0.95)[(1-0.1)×200 + (0.1)[(1-0.2)[5000+100] + (0.2)(10000+100)] + 20]

= 154.5 (in ns)

 

 

Thank You

Download App for Free PDF Download

GovtVacancy.Net Android App: Download

government vacancy govt job sarkari naukri android application google play store https://play.google.com/store/apps/details?id=xyz.appmaker.juptmh