Chapter 5: Q6E (page 487)
In this exercise, we will look at the different ways capacity affects overall performance. In general, cache access time is proportional to capacity. Assume that main memory accesses take 70 ns and that memory accesses are 36% of all instructions. The following table shows data for L1 caches attached to each of two processors, P1 and P2.
L1 Size | L1 Miss Rate | L1 Hit Time | |
P1 | 2 KiB | 8.0% | 0.66 ns |
P2 | 4 KiB | 6.0% | 0.90 ns |
(5.6.1) Assuming that the L1 hit time determines the cycle times for P1 and P2, what are their respective clock rates?
(5.6.2) What is the Average Memory Access Time for P1 and P2?
(5.6.3) Assuming a base CPI of 1.0 without any memory stalls, what is the total Cpi for P1 and P2? Which processor is faster?
For the next three problems, we will consider the addition of an L2 cache to P1 to presumably make up for its limited L1 cache capacity. Use the L1 cache capacities and hit times from the previous table when solving these problems. The L2 miss rate indicated is its local miss rate.
L2 Size | L2 Miss Rate | L2 Hit Time |
1 MiB | 95% | 5.62 ns |
(5.6.4) What is the AMAT for P1 with the addition of an L2 cache? Is the AMAT better or worse with the L2 cache?
(5.6.5) Assuming a base CPI of 1.0 without any memory stalls, what is the total CPI for P1 with the addition of an L2 cache?
(5.6.6) Which processor is faster, now that P1 has an L2 cache? If P1 is faster, what miss rate would P2 need in its L1 cache to match P1’s performance? If P2 is faster, what miss rate would P1 need in its L1 cache to match P2’s performance?
Short Answer
(5.6.1)
The clock rate for P1 is 1.515 GHz and P2 is 1.111 GHz.
(5.6.2)
The average memory access time for P1 is 6.26 and for P2 is 5.1.
(5.6.3)
The total CPI for P1 is 12.53 and for P2 is 7.33.
(5.6.4)
The average access time for processor P1 with both L1 and L2 cache is 6.42. The average memory access time is worse than processor P1 with only one cache.
(5.6.5)
The value of CPI is 8.317.
(5.6.6)
The processor P2 is fast. The miss rate is 0.0635