Calculate the effective CPI (taking into account both instruction execution and memory access) for the following uni fied instruction and data cache.

Instruction execution CPI = 1.0 
Percent of instructions that are loads or stores= 33%
Cycles to access main memory = 100
Cycles to access cache = 2
Miss rate for cache 2.0%
 
What is the total memory access rate?(memory accesses per cycle)
CPI*(data memory accesses+instruction memory accesses) = 1.0*(0.33+1.00) = 1.33
 
How many cycles per instruction are spent handling misses?
1.33 memory accesses per instruction * 2.0% miss rate * 100 cycles per miss 1.33*0.02*100 = 2.66
 
 How many cycles per instruction are spent handling hits?

1.33 memory accesses per instruction * (100% - 2.0%) hit rate *1 cycles per hit 1.33*0.98*2
=2.6
 
What is the effective CPI for the system with the cache?
cycles executing + cycles for hits + cycles for misses =1.0 + 2.66 +2.6 = 6.26m
 

0 comments:

Feel free to contact the admin for any suggestions and help.