ITPEC FE Morning April 2018 Question 10
A computer has two levels of memories, cache memory and main memory, with an access time of 0.01 µs and 0.1 µs respectively. If the hit ratio of the cache memory is 90%, which of the following is the appropriate average memory access time for this system? In this scenario, if the data is in the cache memory, the processor accesses the data directly with an access time of 0.01 µs. However, if a cache miss occurs, the data is required to be transferred from the main memory to the cache memory first, and then subsequently accessed from the cache memory. Thus, the access time becomes 0.11 µs.
Explanation
0.020 µs — weight the hit time and the miss time by how often each happens.
- •Hit (90%): 0.01 µs
- •Miss (10%): transfer from main memory, then read from the cache: 0.1 + 0.01 = 0.11 µs
- •Average: 0.9 × 0.01 + 0.1 × 0.11 = 0.009 + 0.011 = 0.020 µs
Answer (c)
Why not others:
- •(b) 0.019 — 0.009 + 0.1 × 0.1: uses the bare main memory time 0.1 µs for a miss, leaving out the extra cache access the question describes
- •(a) 0.011 — only the miss term 0.1 × 0.11; the 90% of accesses served by the cache are dropped
- •(d) 0.091 — 0.1 × 0.01 + 0.9 × 0.1: swaps the hit and miss ratios, as if the cache missed 90% of the time
Key rule: Average access time = hit ratio × hit time + (1 − hit ratio) × miss time; read the question to see whether a miss costs the main memory time alone or main memory plus the cache.
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.