title: Demand Paging: Calculating effective memory access time
body: <p>I can't understand the answer to this question:</p>
  
  <p>Consider an OS using one level of paging with TLB registers. If the page fault rate is 10% and dirty pages should be reloaded when needed, calculate the effective access time if:</p>
  
  <ul>
  <li>TLB Lookup = 20 ns </li>
  <li>TLB Hit ratio = 80% </li>
  <li>Memory access time = 75 ns</li>
  <li>Swap page time = 500,000 ns </li>
  <li>50% of pages are dirty.</li>
  </ul>
  
  <p><strong>Answer:</strong></p>
  
  <p>T = 0.8(TLB+MEM) + 0.2<b>(</b>0.9[TLB+MEM+MEM] + 0.1[TLB+MEM + 0.5(Disk) + 0.5(2Disk+MEM)]<b>)</b> = 15,110 ns</p>
  
  <p>Can you explain why?</p>