Assume that main memory access takes 70 ns and that memory accesses are 36% of a
ID: 3545280 • Letter: A
Question
Assume that main memory access takes 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
a.
P1
2 Kb
8.0%
.066 ns
a.
P2
4 KB
6.0%
.90 ns
b.
P1
16 KB
3.4%
1.08 ns
b.
P2
32 KB
2.9%
2.02 ns
Now consider the addition of an L2 cache to P1 to presumably make up for its limited cache capacity. Use the L1 Cache capacities and hit times from the previous table when solving this problem. The L2 miss rate indicated is its local miss rate.
L2 Size
L2 Miss Rate
L2 Hit Time
a.
1 MB
95%
5.62 ns
b.
8 MB
68%
23.52 ns
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?
L1 Size
L1 Miss Rate
L1 Hit Time
a.
P1
2 Kb
8.0%
.066 ns
a.
P2
4 KB
6.0%
.90 ns
b.
P1
16 KB
3.4%
1.08 ns
b.
P2
32 KB
2.9%
2.02 ns
Explanation / Answer
L1 size L1 miss rate L1 hit time
P1 1KB 11.4% 0.62ns
P2 2KB 8.0% 0.66ns
1) What is the AMAT for P1 and P2? (5 pts)
P1 = 0.62 + 11.4%*70 = 8.6 ns
P2 = 0.66 + 8.0%*70 = 6.26 ns
Assuming that the L1 hit time determines the cycle times for P1 and P2.
P1 = 1 + 70*11.4%/0.62*0.36= 5.63
P2 = 1 + 70*8.0%/0.66*0.36= 4.05 (faster)
L2 size = 512KB, L2 miss rate = 98%, L2 hit time = 3.22ns. Use the L1 cache capacities and hit times from
the previous table when solving these problems. What is the AMAT for P1 with the addition of an L2
cache?
AMAT of P1 = 0.62 + 11.4%*(0.98*70 + 3.22) = 8.81ns