11,159 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

effective memory access time = miss rate*(service time+memory acess time) +hit rate*memory access time .
edited
From the above formula

$p=$miss rate$,1-p=$hit rate$,ma=$memory access time$,ps=$page fault time $(or)$ service time

$EMAT=p(ps+ma)+(1-p)\times ma$

$EMAT=p(ps)+p(ma)+ma-p(ma)$

$EMAT=p(ps)+ma$

Put the values $p=\frac{0.001}{100}=0.0001=1\times 10^{-4}=10^{-4},ps=10\times 10^{-3}sec,ma=10^{-6}sec$

we get $EMAT=10^{-4}(10\times10^{-3}sec)+10^{-6}sec$

$EMAT=10^{-4}\times(10^{-2}sec)+10^{-6}sec$

$EMAT=10^{-6}sec+10^{-6}sec$

$EMAT=1\mu sec+1\mu sec$

$EMAT=2\mu sec$

please correct me if I'm wrong$?$
lakshman bro, you are not wrong at all

Even the formula that you are deriving na

it is already there on internet

time = memory access time + page fault rate(page fault service time)

1.99999 $\mu s$ is nearly equal to 2 $\mu s$

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 \times 1 + 0.0001 \times 10,000$
$= 0.9999 + 1$
$= 1.9999$ microseconds

Correct Answer: $D$
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 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
edited
Nice exp
Can you please explain how 10,000 is coming?
It is just conversion of miliseconds to microseconds

What exactly you mean by this line? I mean we are just concerned about the page being in Memory or not. We don't care how exactly we reach here (i.e. by TLB Hit or TLB Miss).

Correct me, if i am wrong.

yes, we donot need to think about TLB.

@srestha

I mean we don't even think about Page tables.

why 1000*10?

p=miss rate, 1−p=hit rate, ma=memory access time, ps=page fault time (or) service time

EMAT = p(ps+ma)+(1−p)×ma = p(ps)+p(ma)+ma−p(ma) = p(ps)+ma

Given Values:  p = $\frac{0.001}{100}$ = $10^{-4}$,  ps = 10×$10^{-3}$ sec,  ma=$10^{-6}$ sec

EMAT = $10^{-4}$x(10×$10^{-3}$)+$10^{-6}$ sec

EMAT = $10^{-4}$×($10^{-2}$)+$10^{-6}$ sec

EMAT = $10^{-6}$+$10^{-6}$ sec

EMAT = 1+1 μsec

EMAT = 2 μsec

Please correct if i am mistaken ,

Page Fault service time itself includes accessing specific page from the process and then loading in the main memory and updating the page table , so explicitly we should not consider memory access time though in this case we are almost close to the right answer. The right formula

p-miss rate
EMAT = p(ps)+(1−p)×ma

PS- If its memory hit , we check the page table ,get access to the frame no and go to the respective frame in main memory ,since page table accesss time is not given in ques ,it is assumed "Ma" ( memory access time ) includes both the access time

Yeah, you are right. In galvin also they have said the same thing and in the question below also they are using the same concept.
https://gateoverflow.in/3500/gate2007-it-58

option d

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
by

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 !!!
Average memory access time = (P*t1) + [(1-P)t2]
= (0.9999*1) + [(1-0.9999) *10000]
= (0.9999) + (0.0001 * 10000)
= 0.9999 + 1
= 1.9999 microseconds

1
8,673 views
2
7,173 views
3
8,079 views