485 views
A demand paging system has page fault service time as 125 time units if page is not dirty and 400 times units of page fault service time if it is a dirty page. Memory access time is 10 time units. The probability of a page fault is 0.3. In case of page fault, the probability of page being dirty is P. It is observed that average access time is 50 time units. Then, the value of P is ______? [upto four decimal places]
edited | 485 views
0
0.0303 ??
0

Page fault rate = 0.3

Hence page hit rate = 0.7

Memory access time = 10 time units

Page fault service time  = 125 time units

Let probability of page being dirty = p

Given effective access time  =  50 ns

Thus E.M.A.T  = 0.7 * [Memory access time] + 0.3*[p * (400 PFST) + (1-p) * PFST]

==> 0.7 * 10 + 0.3 *[400*125*p + 125 - 125p]   =   50

==> 7 + 0.3 * [50000p - 125p + 125]  =  50

==> 0.3 * [49875p + 125]  = 43

==> p   =   0.0004 [correct upto 4 decimal places]

NOTE : I have used the expression given in Galvin for effective time calculation..and rest 400 PFST according to the question in case the page is dirty..

selected by
0
0.3*[p * (400 PFST) + (1-p) * PFST] explain this  ???

whats wrong with my approach..
+1
U have forgotten to multiply 400 with PFST in case of page fault and dirty..I think my interpretation is correct..
0

0.7 * 10 + 0.3 *[400*125*p + 125 - 125p]   =   50

why multiplying with 125?

+1
I think that it has mentioned that it takes 400 times the normal PFST in case the page is dirty.
+2
@srestha page fault service time incase of dirty page is 400 "times"
+2
yes I got it
0
Won't there be 2 memory access one for page table and the other for memory?
+2
Then how we know the TLB hit rate? Unless that is given, we can assume memory access time includes page table access time also. Seeing standard book examples make this clear.
0

Why are we having

400*125*p + 125 - 125p

In case of dirty it takes ,then PFST=400 else it is 125.It does not say in case of dirty it is 400 times the normal PFST