Given a computing system with two levels of cache (L1 and L2) and a main memory. The first level (L1) cache access time is 1 nanosecond (ns) and the “hit rate” for L1 cache is 90% while the processor is accessing the data from L1 cache. Whereas, for the second level (L2) cache, the “hit rate” is 80% and the “miss penalty” for transferring data from L2 cache to L1 cache is 10 ns. The “miss penalty” for the data to be transferred from main memory to L2 cache is 100 ns. Then the average memory access time in this system in nanoseconds is ______. (rounded off to one decimal place)
Correct Answer :
Solution :
The correct answer is 4.0.
To find the average memory access time (AMAT) for a hierarchical memory system with two levels of cache (L1 and L2) and a main memory, we can break down the access path and their respective probabilities step-by-step.
1. Identify the given parameters:
- L1 cache access time () = 1 ns
- L1 cache hit rate () = 90% = 0.90
- L1 cache miss rate () = 1 - = 10% = 0.10
- L2 cache local hit rate () = 80% = 0.80
- L2 cache local miss rate () = 1 - = 20% = 0.20
- L1 miss penalty (time to access L2 and transfer to L1, ) = 10 ns
- L2 miss penalty (time to access main memory and transfer to L2, ) = 100 ns
2. Calculate the average penalty when there is an L1 miss:
When the processor misses in L1, it must access the L2 cache. Accessing L2 takes 10 ns. If L2 also misses (which happens with a 20% probability), it incurs an additional penalty of 100 ns to fetch the data from the main memory. Therefore, the average L1 miss penalty () is computed as:
Substituting the given values:
3. Calculate the Average Memory Access Time (AMAT):
The overall average memory access time starts with the L1 access time, plus the L1 miss rate multiplied by the average L1 miss penalty:
Substituting the calculated value:
Thus, the average memory access time in this system is 4.0 nanoseconds.
Access expert-curated educational resources and study materials—completely free.
Create, conduct, and manage professional online assessments with Mindyard. Perfect for teachers and institutes.
Copyright © 2026 Mindyard. All Rights Reserved.