in Operating System edited by
609 views
1 vote
1 vote
A demand paging system requires Sending trap to OS, bring the new page from LAS to PAS,updating page tables,then signaling CPU to restart the instruction time 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 m . In case of page fault, the probability of page being dirty is m.

It is observed that average access time is 50 time units. Then, the value of m is ______? [upto four decimal places]
in Operating System edited by
609 views

1 comment

.2488?
0
0

1 Answer

2 votes
2 votes
Best answer

Given  page fault service time(PS) = 125(no dirty page

         page fault service time(PS) =400(if there is dirty page in which we have to copy and then load page so it take more time compare to no dirty page replacement)

probability of page fault =m

probability of being dirty is =m


 

selected by

10 Comments

@Prince Sindhiya

Shouldn't it be

EMAT= (1-Page_fault_rate) Memory access + Page_fault_rate(page service time) ?

0
0
@prince

Your approach is right but i still have a minor doubt why we are not adding main memory access time with page fault service time as after page fault service again we will access the main memory
0
0
p(400p +125(1-p) )+ (1-p)*10=50

this should be the required equation i think..?

that gives p =0.2488
1
1
@minipanda

EMAT= (1-Page_fault_rate) Memory access + Page_fault_rate(page service time+Memory access)

Now why added the memory access time along with page service because after (page service time )loading the page in main memory, again same instruction start means cpu generate again the same  the logical address so main memory time should again be considered

Emat= p*ps +m,

whichcomes from (p(ps+m)+(1-p)m)

But generally ,that main memory access time is negligible in comparison to pagefault service time so ,if you will not consider it then also answer will not change it will be in closed approximate to the original answer ,and this is what i have seen in many of questions so you can go with this also EMAT= (1-Page_fault_rate) Memory access + Page_fault_rate(page service time)
3
3
aree gajab malik :p
0
0
@arvin from that equation

pshould be= .225
0
0
ok maybe i did somewhere calculation mistake :) thank you
0
0

@Prince Sindhiya

Thanks ..very well explained.. you cleared my confusion.. :) 

0
0
@Minipanda thanxx you too

I learnt the way of learning by following u  :)
0
0

@Prince Sindhiya

Lol..matlab kuch bhi!! :v :v 

0
0

Related questions