If average access time of CPU is 20 ns, access time of main memory is 110 ns…
2026
If average access time of CPU is 20 ns, access time of main memory is 110 ns and the cache access time is 10 ns. What is the hit ratio?
Answer: C. 90% — ConceptFor a one-level cache, let h be the probability of a cache hit; then 1 − h is the probability of a miss. Under the two-outcome timing model used here,…
- A.
80%
- B.
95%
- C.
90%
- D.
100%
Attempted by 306 students.
Show answer & explanation
Correct answer: C
Concept
For a one-level cache, let h be the probability of a cache hit; then 1 − h is the probability of a miss. Under the two-outcome timing model used here, average access time is the probability-weighted mean of the hit-path and miss-path times.
Thus, Tavg = hTc + (1 − h)Tm, where Tc is the cache-hit time and Tm is the complete main-memory miss-path time.
Application
Define the given values: Tavg = 20 ns, Tc = 10 ns, and Tm = 110 ns.
Substitute them into the weighted-average model: 20 = 10h + 110(1 − h).
Expand and collect the h-terms: 20 = 10h + 110 − 110h = 110 − 100h.
Solve: 100h = 90, so h = 0.90 = 90%.
Cross-check
At h = 0.90, the weighted time is 0.90(10 ns) + 0.10(110 ns) = 9 ns + 11 ns = 20 ns, exactly the stated average. Therefore, the hit ratio is 90%.