A certain twoway setassociative cache has an access time of
A certain two-way set-associative cache has an access time of 4 ns, compared to a miss time of 60 ns. Without the cache, main memory access time was 50 ns. Running a set of bench-marks with and without the cache indicated a speedup of 90%. What is the approximate hit ratio?
Solution
Before the cache was added, the average access time was 50 ns. With a
90% speedup, we can calculate the new average access time:
speed up = T old-T new T new = T old T new-1 T new = T old 1 + speed up = 50 ns
1 + 90% = 26 . 32 ns
We can calculate the hit ratio as follows:
T average = hT cache + (1-h ) T memory = h ( T cache)
T av = h*Tc + (1-H * Tm)
S= T without/ T with.
