The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes
Consider a demand paged memory system, page table is held in registers. It takes 800 nsec to service a page fault if empty page is available or replaced page is not modified and 950 nsec if the replaced page is modified, main memory access time is 120 nsec. If page to be replaced is modified 85% of time and page faultrate is 20% then average memory access time is ________. (Upto 1 decimal place)
asked in Operating System by (227 points)
edited by | 148 views
I am getting the answer to be 305.5 but the test shows the answer 281.5
me too getting 305,5

1 Answer

+1 vote
Best answer




0.85*950 since 85% time page to be replaced is modified.
answered by Active (2.6k points)
selected by

The same solution is available in the test series but my doubt is, in page fault why didn't you add the memory access time? 

Isn't the formula like this:

P*( Page fault service time + Memory access time ) + (1-P)( Memory access time )


If there is no page fault then we can get it directly from memory but if there is page fault then we have to service the page fault looking if modified or not then we have to eventually access it from the memory.

I guess you are confusing page fault with cache access time

#source: Galvin


When there is no page fault means that page is present in the main memory itself and we don't have to do anything, but if there is a page fault then it means first we are accessing the main memory to know that the page is not present there and then we have to bring that page from the disk which the page fault service time. Correct me if I am wrong here.

Thanks for clearing my doubt, actually most of the question that I was solving I didn't give any attention to the difference between page fault service time and additional service time. When it says additional then we have to add the memory access time, otherwise just the page fault service time.
We don't go through the entire main memory.We just check the page table for valid or invalid bit which tells us whether the page is present or there is a page fault

@jhaanuj2108 you are right,formula will be,EMAT =P*( Page fault service time + Memory access time ) + (1-P)( Memory access time ).  page fault service time is much much greater than memory access time generally page fault service time is considered in milliseconds and memory access time considered in nanosecond ,in this case we can ignore Memory access time in comparison to  Page fault service time. in Galvin ,memory access time is not considered because of above reason but in above question both are comparable so we can't ignore fault service time does not include memory access time .There are three major components of the page fault service time-(1) service the page fault interrupt (2) read in the page (3) restart the process (according to Galvin).after it we have to access memory again for getting required page.


@Prateek Raghuvanshi

Are u sure? 

yeah absolutely
Tats means key by test series is wrong.rgt?

@Arjun sir, please clear the confusion

which one is the correct formula

P*( Page fault service time + Memory access time ) + (1-P)( Memory access time )


P*( Page fault service time ) + (1-P)( Memory access time )

Related questions

+1 vote
1 answer
+1 vote
1 answer
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
49,427 questions
53,611 answers
70,885 users