2,110 views
0 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 1 vote

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.

Position:
Show:

Related questions

0 0 votes
0 0 answers
2.0k
2.0k views
Abhipsa asked Jan 27, 2019
1,959 views
A demand paging uses a TLB and a single level page table stored in main memory. The memory access time is 5s. The page fault service time is 25s. If 70% of access is in T...
5 5 votes
1 answers 1 answer
1.4k
1.4k views
habedo007 asked Aug 8, 2017
1,397 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 times. Assumi...
1 1 vote
0 0 answers
1.4k
1.4k views
Neal Caffery asked Jan 17, 2017
1,397 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...
1 1 vote
3 3 answers
4.4k
4.4k views
Neal Caffery asked Jan 17, 2017
4,408 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 h...