Cache Average Access Time: Solving the Given Multiple-Choice Problem

Cache Average Access Time: Solving the Given Multiple-Choice Problem

Verified Sources
Nov 4, 2026

To compute the average (effective) memory access time of a two-level hierarchy (cache + main memory), we use the standard expected-time model: with probability hit ratio the access completes at cache time; with probability miss ratio it goes to main memory after (effectively) paying the cache access cost as well. This is typically written as

Average Access Time=(Hit Time)×h+((Hit Time)+(Miss Penalty))×(1−h)\text{Average Access Time}=\text{(Hit Time)}\times h+\left(\text{(Hit Time)}+\text{(Miss Penalty)}\right)\times (1-h)

For the common “cache access time tct_c then, on miss, main memory access time tmt_m” setup, this simplifies to the widely taught form:

Average Access Time=h⋅tc+(1−h)⋅tm\text{Average Access Time}=h\cdot t_c+(1-h)\cdot t_m

Here, we apply it to:

  • cache access time tc=100 nst_c=100\,\text{ns}
  • main memory access time tm=1000 nst_m=1000\,\text{ns}
  • hit ratio h=0.9h=0.9

Effective Access Time Hit Ratio Miss Ratio Cache Hit Time

Compute Average Access Time from Hit Ratio

  1. 1
    Step 1

    Cache time tc=100 nst_c=100\,ns, main memory time tm=1000 nst_m=1000\,ns, hit ratio h=0.9h=0.9 (so miss ratio is 1−h=0.11-h=0.1).

  2. 2
    Step 2

    Use Average=h⋅tc+(1−h)⋅tm\text{Average}=h\cdot t_c+(1-h)\cdot t_m.

  3. 3
    Step 3

    Average=0.9⋅100+(0.1)⋅1000\text{Average}=0.9\cdot 100+(0.1)\cdot 1000 (units in ns).

  4. 4
    Step 4

    Average=90+100=190 ns\text{Average}=90+100=190\,ns.

  5. 5
    Step 5

    The result 190 ns190\,ns corresponds to option (iii).

Quick sanity check

Because the hit ratio is high (0.90.9), the average should be closer to cache time (100100 ns) than main memory time (10001000 ns). A value of 190190 ns fits this intuition.

Common pitfall: double-counting the cache time

Some variants define miss cost differently (e.g., tmt_m as “extra penalty beyond cache time”). If your course uses Average=tc+h⋅0+(1−h)⋅tm\text{Average}=t_c+h\cdot 0+(1-h)\cdot t_m-style definitions, confirm what tmt_m represents (total time vs. miss penalty). Here, the standard choice h⋅tc+(1−h)⋅tmh\cdot t_c+(1-h)\cdot t_m yields 190190 ns, matching the intended answer.

Memory Access Lifecycle (Cache-Based)

Cache lookup

Step 1

Check whether the requested block is in cache."

Hit path

Step 2

If hit, complete in cache time tc=100t_c=100 ns."

Miss path

Step 3

If miss (probability 0.10.1), fetch from main memory in tm=1000t_m=1000 ns."

Expected time

Step 4

Compute weighted average using hh and 1−h1-h."

Expected Time Contribution (Hits vs Misses)

Weighted contributions using h=0.9h=0.9, tc=100t_c=100 ns, tm=1000t_m=1000 ns.

Answer Explanation and Option Selection

Knowledge Check

Question 1 of 3
Q1Single choice

Given cache time tc=100 nst_c=100\,ns, main memory time tm=1000 nst_m=1000\,ns, and hit ratio h=0.9h=0.9, what is the average access time?