I was just solving an exercise when the answer of this suprised me : We have a memory hierarchy built with 2 levels of caches and a main memory, the access time of the L1 is 1 cycle, for L2 it's 10 and the main memory can be accessed in 100 cycles. We are then asked to calculate the AMAT of this memory. The miss rate of L1 is 0.05, this of L2 is 0.2.
I had never learned the formula AMAT = t_cache + MR_caches(t_MM + MR_MM*t_VM) so I computed a solution only with my little brain and for me it was logical that, first 95% of the data are accessed in 1 cycle, we get 0.95. Then out of these 5% left, 80% are accessed in 10 cycles, we get 0.05 * 0.8 * 10. Finally 20% of these 5% are accessed in 100 cycles, which give us 0.05 * 0.2 * 100, it's like probabilities.
What am I doing wrong ? I got an AMAT of 2.35 but the formula tells me it's 2.5.