Consider a two level cache system. For 100 memory references, 16 misses in the first level cache and 8 misses in the second level cache. Miss penalty from L2 cache to memory is 50 cycles. The hit time of L2 cache is 5 cycles and hit time of the L1 cache is 1 clock cycle. What is the average memory access time (in cycle)?
Answer given is 5.8
My attempt:
Miss penalty of L1 cache is nothing but hit time of L2 cache.
So miss penalty of L1 cache = 5 cycles..
Given miss penalty of L2 cache = 50 cycles
So total no of stalls per memory access = Miss rate of L1 x Miss penalty of L1
+ Miss rate of L1 x Miss rate of L2 x Miss penalty of L2
= ((16/ 100) x 5) + ((16/ 100) (8 / 16) x 50)
= (16/ 100) (26)=4.8