Assume that main memory accesses take 70 ns and that memory accesses are 36% of
ID: 3835227 • Letter: A
Question
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. Processor LI Cache Size LI Miss Rate LI Hit Time PI 2 KB 8.0% 0.66 ns 4 KB 6.0% 0,90 ns a Assuming that the L1 hit time determines the cycle times for P1 and P2, what are their respective clock rates? (Hint: time for one instruction-CPI clock rate) b) What is the Average Memory Access Time for P1 and P2? Which processor is faster for memory accesses c) Assuming a base CPI of l.0 without any memory stalls (for the rest of the instruction types in the program), what is the total average CPI for P1 and P2? We will consider the addition of an L2 cache to P1 to presumably make up for its limited L1 cache capacity; on a miss, Pl will now first check L2 cache, and only if that is a miss, will then need a main memory access. 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. PI 5.62 ns d) What is the AMAT for Pl with the addition of an L2 cache?Explanation / Answer
a)
Clock Rate = 1/(L1 hit time)
Clock Rate for P1 = 1/0.66ns = 1.5152 GHz.
Clock Rate for P2 = 1/0.90ns = 1.112 GHz.
b)
Average Memory Access Time (AMAT) = Hit Rate * Hit time + Miss Rate * Miss Time
AMAT for P1 = (92% * 0.66ns) + (8% * 70ns)
= 5.6 ns.
AMAT for P2 = (94% * 0.90ns) + (6% * 70ns)
= 4.2 ns.
c)
for P1:
Miss Cycles = (IC * Memory Access Freq * Miss Rate)(Main Memory Access/L1 Hit Time)
= (IC * 0.36 * 0.08) (70ns/0.66ns)
= 3.054 * IC
(IC = Instruction Count)
Total Cycles = 1.0*IC + Miss Cycles = 3.054 * IC
CPI = Total Cycles / Instruction Count = 3.054
for P2:
Miss Cycles = (IC * Memory Access Freq * Miss Rate)(Main Memory Access/L1 Hit Time)
= (IC * 0.36 * 0.06) (70ns/0.90ns)
= 1.68 * IC
(IC = Instruction Count)
Total Cycles = 1.0*IC + Miss Cycles = 1.68 * IC
CPI = Total Cycles / Instruction Count = 1.68