Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can someone please explain step by step how to break this down to get the answer

ID: 3859379 • Letter: C

Question

Can someone please explain step by step how to break this down to get the answer.

This is from Computer Architecture book by Behrooz

Given a system with an L1 cache with a local hit rate of 95%. For the L2 cache a hit incurs a penalty of 10 clock cycles, while a miss has a 50-cycle penalty. a. Assuming the system has a CPI of 1.8 with no cache misses, calculate the effective CPI if L2's local miss rate is 20%. b. Changing the mapping scheme of L2 from set-associative to direct changes the local miss rate to 30%, but decreases the hit penalty to 8 clock cycles. Is the effective CPI an improvement?

Explanation / Answer

For no cache miss:
   L1 hit: 95/100 * x
   L1 miss and L2 hit: 5/100 * 100/100 * 10x
----------------------------------------------
              total: 0.95x + .5x = 1.45x

therefore x = 1.8/1.45 = 1.2414


For L2 miss rate 20%
   L1 hit: 95/100 * x
   L1 miss and L2 hit: 5/100 * 80/100 * 10x
   L1 miss and L2 miss: 5/100 * 20/100 * 50x
----------------------------------------------
              total: 0.95x + 0.4x + 0.5x= 1.85x

We know the value of x, therefore : total = 1.85 * 1.8 / 1.45 = 2.3 CPI


For L2 miss rate 30% and L1 miss penalty 8cycle
   L1 hit: 95/100 * x
   L1 miss and L2 hit: 5/100 * 70/100 * 8x
   L1 miss and L2 miss: 5/100 * 30/100 * 50x
----------------------------------------------
              total: 0.95x + 0.28x + 0.75x= 1.45x = 1.98x

So we can say that configuration with L2 miss rate 20% was better

I hope the answer is clear to you