Suppose a computer having 5 GHz processor with cycle time of 4ns and main memory access time
200ns with CPI is 1 cycle.
i. Calculate the processor performance without cache.
ii. Calculate the performance with L1 cache, assume L1 hit rate is 85% and access time is 0.4ns.
iii. Calculate the performance with L2 cache, assume L2 hit rate is 80% and access time is 10ns.
iv. Calculate the performance with L3 cache, assume L3 hit rate is 75% and access time is 10ns.
Given,
A computer having 5ghz processor
cycle time = 4hrs
Main Memory = 200ns wit CPI as 1 cycle
(i)Performance without cache =1cycle/instruction
"=4 hrs"
"\\Rightarrow 4hrs+\\text{ memoery access}=4+200=204ns"
(ii) The Performance with "L_1" cache, assume "L_1" hit rate is 85% and access time is 0.4ns.
"=0.85\\times 0.4+0.15[200+0.4]\\\\=30.4ns"
(iii) The performance with "L_2" cache, assume "L_2" hit rate is 80% and access time is 10ns
"=0.85+0.4+0.15[0.4+10]\\times 0.8+0.15\\times 0.2\\times 210.4\\\\=7.9ns"
(iv) The performance with "L_3" cache, assume "L_3" hit rate is 75% and access time is 10ns
"=0.85\\times 0.4+0.15\\times 0.8\\times 10.4+0.15\\times 0.2\\times 0.75\\times 20.4+0.15\\times 0.2\\times 0.25\\times 220.4\\\\=3.7ns"
Comments
Leave a comment