FOR FREE CONTENT

Effective Memory Access Time (EMAT) with Page Fault rate

 

Before seeing this chapter please follow the previous chapter: Demand paging and page fault

 

So, from what we know from the previous chapter due to page fault, the overhead is very high, it takes a lot of time for the whole procedure to update the page table or page replacement operation.

 

Now we calculate Effective Memory Access Time (EMAT) using page fault ratio:

 

Two situations can occur to get page number from the page table:

(a) Page Fault occurred: It will take extra time for a page fault.

(b) No Page Fault occurred: It will not take extra time.

 

Now, a page fault will occur for every certain amount of main memory access, which is called page fault rate.

 

For example, if one page fault has occurred for every memory access 105 instruction i.e. one-page fault occur after every 105  instruction in memory then 

 

 

Or we can calculate it another way like if the hit ratio to access memory is 80% means the page available at memory is 80%. So, the miss ratio means the page fault ratio is 20%.

 

Let,

Page fault rate = p,  memory access time = m, and extra time is taken for page fault service = PF (because we know if page fault occurred, we need some extra time for it).

 

So,

Where (1 - p) is no page fault rate. 

 

Note: Page fault service time is comparatively higher than memory access time. So, it makes a big difference in EMAT if a page fault occurred. 

 

Now, we can minimize the formula of EMAT to make calculation easy:

 

 

So, it is easy to use this formula to calculate

 

Note: In this minimize formula basically we neglect main memory access time when page fault occurred because main memory access time is very low compare to page fault service time.

 

Example Type 1: 

Consider a paging system where memory access time is 60ns and additional page fault service time is 20ms. If a one-page fault occurred after every instruction access in memory, then find effective memory access time (EMAT).

 

Solution:

As we know, 

 

 

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

 

Here memory access time (m) = 60ns, page fault service time = 20ms and page fault rate = 1/106

 

 

So, Effective Memory Access Time (EMAT) for this above example is 80ns.

 

Example Type 2: 

In a paging system, page fault service time required 10ms and main memory access time is 4 microseconds. If the hit ratio is 90%, find the Effective Memory Access Time (EMAT).

 

Solution:

As we know, 

 

 

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

 

Here memory access time (m) = 4μsec, page fault service time = 20ms and hit ratio = 99.9% so, miss ratio or page fault ratio = (1 - 99.99%) = 0.01%, so page fault rate 0.01/100 = 0.0001 i.e. 104.

 

 

So, Effective Memory Access Time (EMAT) for this above example is 6μsec.