Consider a system with 2 level cache. Access times of Level 1 cache, Level 2…

2018

Consider a system with 2 level cache. Access times of Level 1 cache, Level 2 cache and main memory are 0.5 ns, 5 ns and 100 ns respectively. The hit rates of Level 1 and Level 2 caches are 0.7 and 0.8 respectively. What is the average access time of the system ignoring the search time within the cache?

  1. A.

    35.20 ns

  2. B.

    7.55 ns

  3. C.

    20.75 ns

  4. D.

    24.35 ns

Attempted by 91 students.

Show answer & explanation

Correct answer: B

Key idea: because the problem asks to ignore search time within the cache, treat the access time as the time of the level that supplies the data (do not add times across levels).

  • Given:

    L1 access time = 0.5 ns, L2 access time = 5 ns, main memory = 100 ns; L1 hit rate = 0.7, L2 hit rate (when accessed) = 0.8.

  • Formula (ignoring cumulative search time): Average access time = hit_L1*time_L1 + miss_L1*(hit_L2*time_L2 + miss_L2*time_main).

  • Substitute numbers: 0.7*0.5 + 0.3*(0.8*5 + 0.2*100).

  • Compute step-by-step: 0.7*0.5 = 0.35; 0.8*5 = 4; 0.2*100 = 20; 4 + 20 = 24; 0.3*24 = 7.2; 0.35 + 7.2 = 7.55.

Answer: 7.55 ns

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor