Assume you have an instruction cache miss rate of 4 and a da
Assume you have an instruction cache miss rate of 4%, and a data cache miss rate of 2%. The miss penalty is 100 cycles. You have a program that is 25% load-store instructions, with a base CPI of 1. What will its CPI be including cache misses?
Solution
Given miss penalty is 100 cycles
Given that I-cache miss rate is 2%
so instruction cache can be calculated by using = I-cache * misspenality
0.02 * 100 =2
Given that D-cache miss rate is 4% and the program contains 25% Load-Store instructions
Hence data cache is given by = number of Load-store instructions * D-cache miss rate * misspenality
=0.25*0.04*100=4
Now given that the base CPI is 1
Hence CPI is given as =I-cache + D-cache + CPI base
= 2+4+1
=7
And here Ideal CPU is given by 7/2 =3.5 times faster

