The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+14 votes
2.5k views

Suppose the time to service a page fault is on the average 10 milliseconds, while a memory access takes 1 microsecond. Then a 99.99% hit ratio results in average memory access time of

  1. 1.9999 milliseconds
  2. 1 millisecond
  3. 9.999 microseconds
  4. 1.9999 microseconds 

 

asked in Operating System by Veteran (68.9k points)
edited by | 2.5k views

#help

https://gateoverflow.in/77662/self_doubt             

effective memory access time = miss rate*(service time+memory acess time) +hit rate*memory access time .

2 Answers

+27 votes
Best answer
Since nothing is told about page tables, we can assume page table access time is included in memory access time.

So, average memory access time

= .9999 * 1 + 0.0001 * 10,000
= 0.9999 + 1
= 1.9999 microseconds
answered by Veteran (332k points)
selected by
can TLB hit lead to page fault ?

Good question- I was too naive to say that. It won't happen normally, and in this question page fault occurs only during TLB miss meaning TLB hit cannot be more than 99.99%. But that can be assumed to be 100% for calculation purpose. Or we can even assume page table access time is included in the memory access time given here. http://stackoverflow.com/questions/6398811/can-a-tlb-hit-lead-to-page-fault-in-memory

thanks !!!
sir,

page fault service time =  memory access time + additional overhead during page fault  or

page fault service time= additional overhead during page fault.
^
page fault service time includes memory access time.
plz elaborate it solution ... According to formula it's (%of page miss *time to service page fault.  )+(%page hit )*(memory access time)    whole divide by 100
memory access time is negligible compared to page fault service time
Nice exp
+1 vote
CAN ANYONE TELL ME WHERE AM I WRONG

Step 1: memory read to access the page table (1 micro second)

case 1) frame number found -> second memory access to access the desired page from memory (1 microsecond)

case 2) frame number not found -> page fault -> service the page fault (10000 microseconds)

Step 2:   (.9999*(first memory access time + second memory access time)) +

             (.0001*(first memory access time + time to service page fault))

             = (.9999*2)+(.0001*10001)

             =2.9999 micro seconds
answered by Loyal (3.8k points)
You are not wrong. But question doesn't say anything about page tables so we can assume nearly 100% TLB hit or that page table access time is also counted as part of memory access time given. (If 2 level paging is used we will need 2 page table accesses, so we can't assume a memory access for a page table access every time)
Thanks !!!


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

32,694 questions
39,293 answers
110,112 comments
36,702 users