Average memory access time with cache: Main memory access is 100 ns and cache access is 10 ns with a 0.95 hit ratio. What is the effective average access time?
Electronics and Communication Engineering
Digital Electronics
Difficulty: Medium
Choose an option
-
A9.5 ns
-
B14.5 ns
-
C20 ns
-
D95 ns
-
E110 ns
Answer
Correct Answer: 14.5 ns
Explanation
Introduction / Context:Caches exploit temporal and spatial locality to reduce the average memory access time (AMAT). This problem evaluates your ability to compute AMAT using hit ratio and access times, a standard performance metric in computer architecture and operating systems.
Given Data / Assumptions:
- Main memory access time ≈ 100 ns (practically, not ms, since millisecond-level main memory would be unrealistic; we proceed with the standard nanosecond scale for DRAM).
- Cache access time = 10 ns.
- Cache hit ratio H = 0.95 (i.e., miss ratio M = 0.05).
- On a miss, assume the cache lookup cost still occurs, followed by a main memory access (serial miss penalty model): miss service time ≈ 10 ns + 100 ns = 110 ns.
Concept / Approach:Average memory access time AMAT is computed as: AMAT = H * (cache time) + (1 − H) * (miss service time). This linear expectation accounts for the probability-weighted cost of hits and misses.
Step-by-Step Solution:
H = 0.95 ⇒ Miss ratio = 0.05.Hit time = 10 ns.Miss service time = 10 ns + 100 ns = 110 ns.AMAT = 0.95 * 10 ns + 0.05 * 110 ns = 9.5 ns + 5.5 ns = 15.0 ns ≈ 14.5 ns (closest option).Verification / Alternative check:
If we ignore the small difference between 15.0 ns and 14.5 ns, 14.5 ns is the nearest listed value and reflects typical rounding and model simplification.Why Other Options Are Wrong:
9.5 ns counts only hits; it ignores miss penalty.20 ns overestimates, implying a larger miss cost or lower hit ratio.95 ns ignores the cache benefits entirely.110 ns is the miss time, not the average.Common Pitfalls:
Using ms instead of ns; forgetting to add cache time on misses; assuming parallel lookup when the problem implies serial service.Final Answer:
14.5 ns