1. [20 marks] We investigate the increase in CPI (clocks per instruction) due to
ID: 3806395 • Letter: 1
Question
1. [20 marks] We investigate the increase in CPI (clocks per instruction) due to cache misses that occur during memory references. For simplicity, we pretend that instruction fetches never miss. a) [10 marks] Suppose the processor takes an average of 1.5 clock cycles to execute an instruction when there are no cache misses. Assume that the miss penalty is 8 cycles and that there is an average of 1 memory reference per 3 instructions. This base CPI of 1.5 cycles includes the cache hit time. Suppose the miss rate is 5%. Using the formula t_ave = ht + mr * mp, what is the CPI when cache misses are taken into account? b) [10 marks] Consider the same processor with a two-level cache. The hit rates for the L1$ and the L2$ are 95% and 80%, respectively. The local miss penalties are 8 cycles and 60 cycles, respectively. Assume the same density of memory references. If the CPI is 1.5 cycles when there are no cache misses, what is the CPI when cache misses are taken into account? Hint: Apply the formula recursively to find the effective miss penalty of the L1$.
Explanation / Answer
CPI=base CPI+ Icache
base CPI=1.5
Icache=miss rate*miss penalty
Icache=0.05*8
0.4
CPI= 1.5+0.4
=1.9 cycles per instruction
2) CPI= CPI+L1 miss rate*L1 miss penalty+ L2 miss rate* L2 miss penalty
L1 miss rate=(100-95)=5%
L1 miss penalty=8
L2 miss rate=(100-80)=20
L2 miss penalty=60
CPI=1.5+(.05*8)+(.20*60)
cpi=13.9 cycles per instruction
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.