Ques. In a two-level memory hierarchy, let $t_1 = 10^{-7s}$ and $t_2 = 10^{-2s}$. If ta denotes the average access
time of the memory hierarchy, and if we define the access efficiency to be equal to $t_1=t_a$, then what
must the hit ratio $H$ be in order for the access efficiency to be at least $80\%$ of the maximum value?
Solution: For a $2-$level hierarchy, the average access time is given by:
$t_a = t_1 + (1 - H) * t_2$
where $H$ is the hit ratio, $t_1$ is the hit time, and $t_2$ s the miss penalty. Note that when on a cache miss,
the amount of time it takes to service the memory access request is $(t_1 + t_2)$, and hence, the miss
penalty is $t_2$.
Hence, we want to find H such that the access efficiency $\dfrac{t_1}{t_a} \geq 0.8$. That is,
$t1 \geq 0.8 * (t_1 + (1 - H) * t_2)$
On Solving :-
$H \geq 1- t_1 / (4*t_2)$
Substituting the values for $t_1$ and $t_2$, you can get:
$H = 0.9999975$
My Doubt is when we solve such Question we Studied that
$T_{avg} = (HitRatio * HitTime + MissRatio * Miss Time)$
Why they have considered only Hit Time instead of Hit Ratio and Hit time....
and plz explain which one to use and when...