1,256 views
0 votes
0 votes

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 page
table is 50ns. To reduce this overhead, the computer has a TLB, which holds 32 (virtual page,
physical page frame) pairs and can do a look up in 10ns. On a TLB miss, the OS accesses the
memory to get the page table entry and updates the TLB (the update time of the TLB is included
in the 50ns of the page table access). What hit rate is needed to reduce the mean access time to
20ns?

OFFICIAL. Solution: 10ns + (1 - p) 50ns = 20ns
p =4/5 = .80
The TLB hit rate has to be 80% for a mean access time of 20ns.

1 Answer

1 votes
1 votes

We know EMAT = H(t+m) + (1-H) (t+kn+m)

Here H = TLB hit ratio, t=TLB access time, n=Page table access time, m= Main memory access time, k = no. of levels of page tables.

Now simplifying the equation:-

EMAT = Ht + mH + t + m + n - Ht -mH - nH, Here k = 1,

After cancellation we get:-

= t + (1-H)n + m

But here we dont need to access the main memory, we only seek time required to read a word from the page table. So ignore m

So our formula boils down to t + (1-H)n

Putting the values 10ns + (1 - p) 50ns = 20ns . This gives 80% as the Hit ratio.

 

NOTE:- The questions on paging and TLB as done as:-

EMAT = Time taken to convert Virtual address to Physical Address(Address Translation) + Time to access the main memory

          = t + (1-H) (k*n) + m + (PF*PFS)

            where t=TLB access time, H=TLB hit ratio, k=no. of levels of paging, n = page table access time, m=main memory access time, PF= page fault rate, PFS= page fault service time.

We use the formula according to our requirement.

If the page fault is considered in the question , we use it otherwise we ignore it.

Related questions

0 votes
0 votes
0 answers
1