ITPEC FE Subject A October 2024 Question 9

Topic: Computer ComponentAlso asked in October 2020

When the CPU needs data, it first accesses the cache memory. When the data is not available in the cache memory, the CPU accesses the main memory. If the miss ratio is 0.2 and the access times for cache memory and main memory are as shown below, what is the approximate average memory access time in ns for the CPU? Here, there are only cache memory and main memory for the CPU, the access time for main memory includes the time to confirm whether the data is available in cache memory, and the overhead time for the cache management can be ignored.

Access destinationAccess time (ns)
Cache Memory75
Main Memory1500

Explanation

360 ns — weight each access time by how often it happens: hits are served by the cache, misses by main memory.

Hit ratio = 1 − 0.2 = 0.8. The main-memory time already includes the cache check, so a miss costs just 1500 ns:

0.8 × 75 + 0.2 × 1500 = 60 + 300 = 360 ns

Answer (b)

Why not others:

  • •(a) 315 — 0.2 × (75 + 1500): counts only the misses, adds a cache time the miss figure already includes, and drops the 80% of accesses that hit
  • •(c) 1,215 — 0.2 × 75 + 0.8 × 1500: swaps the hit and miss ratios
  • •(d) 1,260 — 0.8 × (75 + 1500): the mistake behind (a), with 0.8 taken as the miss ratio

Key rule: Average access time = h × Tc + (1 − h) × Tm, with hit ratio h; add the cache time to a miss only when the main-memory figure excludes the cache check.

Computer Component · AI-written, may contain errors

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.