L1 has a 1 ns hit time and a 10% miss rate; L2 has a 10 ns hit time and a 20% local miss rate; main memory takes 100 ns. What is the average memory access time?
Correct answer D. 4 ns
Explanation
Work from the bottom up: the L1 miss penalty is L2 time plus L2 misses, 10 + 0.20 x 100 = 30 ns. Then AMAT = 1 + 0.10 x 30 = 4 ns. Answering 3 ns ignores L2 misses, and 13 ns charges the L2 time on every access instead of only on L1 misses. A local miss rate applies only to accesses that reach that level.
Answer checked How we write and check questions
Discussion