4,229 views
3 votes
3 votes

Consider an L1 cache with an access time of 1 ns and a hit ratio of H 0.95. Suppose that we can change the cache design (size of cache, cache organization) such that we increase H to 0.97, but increase access time to 1.5 ns. What conditions must be met for this change to result in improved performance?


plzz add more in this answer and correct the  answer if wrong......

when we increase the hit ratio than the acces time is increased as given in the question..


i think we should use direct mapped cache...and we should increase the size of the cache as.. in direct cache  we need address...to  identify the particular word.....so it easy to get word in less time due to avalibility of address...


but if we use associative cache than there is no need of address and so we have to search throught the cache which wiill increase the cache accees time ..and performance will decreases.....


1 Answer

Best answer
6 votes
6 votes
The question says that increasing the cache size results in better hit rate and more access time. So, we need not think about how this is achieved (direct or associative) but just give the equation for access time. Assuming simultaneous access: (by default take hierarchical)

$T_{avg} = 0.95 \times 1 + 0.05 \times T_{mem}$

$T_{avg}^{new} = 0.97 \times 1.5 + 0.03 \times T_{mem}$

$T_{avg}^{new} < T_{avg} \implies \\ 0.97 \times 1.5 + 0.03 \times T_{mem} < 0.95  + 0.05 \times T_{mem} \\ T_{mem} > \frac{0.505}{0.02} = 25.25 ns$

For hierarchical access:

$T_{avg} = 1 + 0.05 \times T_{mem}$

$T_{avg}^{new} = 1.5 + 0.03 \times T_{mem}$

$T_{avg}^{new} < T_{avg} \implies \\1.5 + 0.03 \times T_{mem} < 1 + 0.05 \times T_{mem} \\ T_{mem} > \frac{0.5}{0.02} = 25 ns$
selected by

Related questions

0 votes
0 votes
2 answers
1
rahuldb asked Nov 10, 2016
2,974 views
In a two level hierarchy if the top level has an access time of 8ns and the bottom level has an access time of 60 ns. What is the hit ratio in top level required to give ...
2 votes
2 votes
2 answers
3
rahuldb asked Nov 17, 2016
3,391 views
What is the hit ratio of a cache memory.If cache memory access time is 30ns,main memory access time is 150ns and avg access time is 42ns.