edited by
2,770 views
2 votes
2 votes

First read this whole thing what I am writing below:

Case 1: If we have to access unit address in memory using TLB and we assume that no page fault occurs then,

EMAT=p( T+M )+( 1-p ) (T+M+M)

T=TLB access time, M=memory access time(page table access time is included), p= TLB hit. EMAT : estimated memory access time.

case 2: As case 1 , But here page fault occurs.

QUESTION: Now how will we calculate EMAT?
Does the following calculated EMAT affect or contributes to the solution of my question?
EMAT= X(S+M)+(1-X)(M)
X=page fault occurring ratio, S=page fault service time
Note: Here we are not using any TLB. This is for normal virtual memory concept without TLB

Now my main question is: when we calculate EMAT using TLB and if there page fault occurs then how does the last calculated EMAT here affects the first Estimated memory access time which we have calculated using TLB?

edited by

1 Answer

2 votes
2 votes

EMAT= X(S+M)+(1-X)(M)

just add one more M for page table access at the beginning and it will be correct:

EMAT= M + X(S+M)+ (1-X)(M)

In paging and cache concepts always go step by step, i.e., hierarchically. EMAT with TLB and Page Fault both in picture:

If TLB is updated asap(use this for numericals):

EMAT = t ( tat + m ) + (1-t) ( tat + m + pf(pfst+m) + (1-pf)m ) 

If TLB hasn't been update when we looked up for a page in it(helpful in interviews just to give a point):

EMAT = t ( tat + pf(pfst+m) + (1-pf)m ) + (1-t) ( tat + m + pf(pfst+m) + (1-pf)m ) 

where t=TLB hit probability, tat=TLB access time, pf=Page Fault probability, pfst=Page Fault service time and m=memory access time.

Pseudo-code/Procedure:

check with TLB
if found in TLB
    {
        go to memory
     }
else not in TLB
    {
        go to page table in memory 
        {
            go to memory
            {
                if page fault occurs
                    service page fault then acess memory
                else
                    access memory
            }
        }
    }

edited by

Related questions

1.4k
views
1 answers
0 votes
rahuljai asked Dec 3, 2018
1,374 views
Why the formula used here is not P(10) + (1-P)(50) = 20 ?;A computer keeps its page tables in memory. The time required to read a word from the pagetable is 50ns. ... =4/5 = .80The TLB hit rate has to be 80% for a mean access time of 20ns.
1.1k
views
1 answers
5 votes
habedo007 asked Aug 8, 2017
1,059 views
A computer has a 128-entry $L_1$ TLB, 1024-entry $L_2$ TLB, and uses page size of 4KB. A program reads a 1MB array, one byte at a time from start to end, 10 ... , find TLB hits and misses of both $L_1$ and $L_2$ TLB (array is page aligned).
942
views
0 answers
1 votes
Neal Caffery asked Jan 17, 2017
942 views
Consider a memory system consists of a single external cache with an access time of 30ns and a hit rate of 0.85, and a main memory with an access time of 80ns. Now we add virtual ... ?( Marks: 0.00 ) 8ns 30ns 40ns 51ns
3.8k
views
3 answers
1 votes
Neal Caffery asked Jan 17, 2017
3,817 views
Consider a system with 2-levels of paging and a TLB with hit rate of 95% and TLB access time of 1ns. Find the effective memory access time if there's a data cache whose hit rate ... 100ns.100ns. 27ns 25ns 30ns 20ns