CREATE OWN LIBRARY

More GATE/NET Question on EMAT with Page Fault rate   

 

Question: GATE 98 and UGC 2012

If an instruction takes ‘i’ microseconds and a page fault takes an additional ‘j’ microseconds. The effective instruction time, if the average a page fault occurs every k instructions is 

 

a)  i +j / k        b)  i + j*k        c) (i + j) / k      d) ( i + j) * k

 

You should know:

Before seeing the solution please follow the previous chapter:  Effective Memory Access Time (EMAT) with Page fault rate

 

Solution: 

In this question, instruction takes means they mean memory access takes and effective instruction time means effective memory access time.

 

As we know, 

 

 

Now, we can use optimize formula EMAT =  p(pf) + m which same as above

 

Here memory access time (m) = ‘i μsec', page fault service time = ‘j μsec' and page fault rate = 1/k

 

 

So, effective instruction time = EMAT = i + j / k

 

So, option (a) is correct.

 

Question: UGC 2014

In a demand paging memory system, a page table is held in registers. The time taken to service a page fault is 8 msec. if an empty frame is available or if the replaced page is not modified, and it takes 20 m.secs., if the replaced page is modified. What is the average access time to service a page fault assuming that the page to be replaced is modified 70% of the time?

(A) 11.6 m.sec.

(B) 16.4 m.sec.

(C) 28 m.sec.

(D) 14 m.sec.

 

You should know:

Before seeing the solution please follow the previous chapter:  Effective Memory Access Time (EMAT) with Page fault rate Number of information at page entry

 

Solution: 

As know dirty page means the page which is modified when it resides in the main memory. And when we want to replace the modified page it requires more additional time to save all modification data.

 

To know more about dirty page follow: Number of information at page entry

 

We know when page fault occurred two situations can happen:

1) Memory frame is free we just copy the required page from secondary memory. 

2) Memory is not free, then we have to replace the page and a certain page which is decided to replace is a dirty mean modified page.

 

In two cases two different times will be required to complete page fault service. 

 

Given data:

Page fault service time when memory is free and replaced page is not modified = 8 msecs

Page fault service time when memory is not free and page replacement is needed with modified page = 20 msecs

70% of the time modified page occurred in the process execution at the time of page fault.

So, 30% of chance memory frame is freed or replaced page are not modified.

 

Now, they are asking for average access time to service a page fault not effective memory access time but the formula is the same as that.

 

Average page fault service time 0.7 (20) (modified page) + 0.3 (8) (no page replacement or not modified page)

So, Average page fault service time = 14 + 2.4 = 16.4

 

Option (b) is correct.

 

Question: GATE 2007

A demand paging system takes 100 time units to service a page fault and 300 time units to replace a dirty page. Memory access time is 1 time unit. The probability of a page fault is p. In case of a page fault, the probability of the page being dirty is also p. It is observed that the average access time is 3 time units. Then the value of p is

 

(A) 0.194

(B) 0.233

(C) 0.514

(D) 0.981

 

You should know:

Before seeing the solution please follow the previous chapter:  Effective Memory Access Time (EMAT) with Page fault rate Number of information at page entry

 

Solution: 

As know dirty page means the page which is modified when it resides in the main memory. And when we want to replace the modified page it requires more additional time to save all modification data.

 

To know more about dirty page follow: Number of information at page entry

 

We know when page fault occurred two situations happen:

1) Memory frame is free we just copy the required page from secondary memory. 

2) Memory is not free, then we have to replace the page and a certain page which is decided to replace is a dirty mean modified page.

 

In two cases two different times will be required to complete page fault service. Generally when replace page is modified (dirty) it required more time because additional time is taken to update the modified portion.

 

Important point: In two situations of when two different page fault service time is given, we have to calculate average page fault service time before calculate the effective memory access time (EMAT).

 

Here, page fault service time = 100 unit, page fault service time when the replaced page is dirty = 300 unit, probability of replaced page being dirty = p, so, probability of replaced page being not dirty = (1- p)

 

 

 

Now, 

 

 

Now, we can use optimize formula EMAT = p(pf) + m which same as above

Where p is the probability of a page fault, pf = total page fault service time = 100 + 200p (Calculated), main memory access time (m) = 1 unit (given) and effect memory access time (EMAT) = 3 unit (given).

 

 

So, the probability of a page fault i.e. page fault rate (p) = 0.0194

 

So, option (A) is correct.