Question:

Given a computing system with two levels of cache (L1 and L2) and a main memory. The first level (L1) cache access time is 1 nanosecond (ns) and the “hit rate” for L1 cache is 90% while the processor is accessing the data from L1 cache. Whereas, for the second level (L2) cache, the “hit rate” is 80% and the “miss penalty” for transferring data from L2 cache to L1 cache is 10 ns. The “miss penalty” for the data to be transferred from main memory to L2 cache is 100 ns. Then the average memory access time in this system in nanoseconds is ___________ . (rounded off to one decimal place)

Show Hint

When calculating AMAT, always account for both the hit time and the miss penalty of each cache level.
Updated On: Apr 7, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

The formula for average memory access time (AMAT) in a system with two cache levels is: \[ {AMAT} = {Hit time}_{L1} + {Miss rate}_{L1} \times ({Hit time}_{L2} + {Miss rate}_{L2} \times {Miss penalty}_{L2}) \] Step 1: Given Data - \( {Hit time}_{L1} = 1 \) ns - \( {Hit rate}_{L1} = 0.90 \Rightarrow {Miss rate}_{L1} = 1 - 0.90 = 0.10 \) - \( {Hit time}_{L2} = 10 \) ns - \( {Hit rate}_{L2} = 0.80 \Rightarrow {Miss rate}_{L2} = 1 - 0.80 = 0.20 \) - \( {Miss penalty}_{L2} = 100 \) ns 
Step 2: Compute AMAT \[ {AMAT} = 1 + (0.10 \times (10 + (0.20 \times 100))) \] \[ = 1 + (0.10 \times (10 + 20)) \] \[ = 1 + (0.10 \times 30) = 1 + 3 = 4.0 { ns} \]

Was this answer helpful?
0
0

Top Questions on Operating Systems