184 views
0 votes
0 votes
Assume the following setup on a machine — latency of single memory access is $45\;ns$, a two-level page table is used for memory translations, and $\textbf{TLB}$ lookup latency is $5\;ns$.
Assuming no page faults, what should be the $\textbf{TLB}$ hit rate to achieve an average memory access latency of $95\;ns$ ?

1 Answer

1 votes
1 votes
Given,

main memory access time  $= T_m = 45 \ ns$

TLB access time  $= T_t = 5 \ ns$

$2-$ level paging is used.

EMAT  $= 95\ ns$

Let TLB hit ratio $= h_t$

We know that,

EMAT $= (\underbrace {h_t}_{\text{TLB hit}}) \times (\underbrace {T_t}_{\text{TLB Access time}} + \underbrace {T_m}_{\text{Main Memory Access time}}) \ + \ (\underbrace {1 \ – \  h_t}_{\text{TLB Miss}}) \times (\underbrace {T_t}_{\text{TLB Access time}} + \underbrace {T_m}_{1^{st} \text{ level page table Access time}} + \underbrace {T_m}_{2^{nd} \text { level page table Access time}} + \underbrace {T_m}_{\text{Main Memory Access time}})$

$95 = h_t (5 + 45) + (1 – h_t)(5 + 45 +45 + 45)$

$95 = h_t (50) + (1 – h_t)(140)$

$95 = 50 h_t + 140 – 140 h_t$

$90 h_t =  45$

$h_t = \frac {1} {2} = 0.5 = 50$%

Related questions

0 votes
0 votes
0 answers
3
0 votes
0 votes
0 answers
4
admin asked Nov 30, 2021
113 views
Kamala tosses $11$ fair coins and Rajani tosses $10$ fair coins. The probability that the number of heads obtained by Kamala is more than the number of tails obtained by ...