Minmin 9
Minmin 9
ORGANIZATION
After Midterm
الر ِحي ِم
َّ ن
ِ ـ مح الر
َّ ْ َ ٰ ِ
ـهَ ِب ْس ِم الل ّ
14
Exploiting Memory Hierarchy
” حسبنا الله سيؤتينا الله من فضله ان الى اللهراغبون ”
Example Problem
We divide the byte address by the block size to find the index
field As block size = 16 bytes:
byte address 1200 block address 1200/16 = 75
As cache size = 64 blocks:
block address 75 cache block (75 mod 64) = 11
Performance
2.
CPI without stall = 1
CPI with stall = 1 + 1.376 = 2.376 (clock has not changed so
stall cycles per instruction
remains same)
CPU time with stalls / CPU time with perfect cache
= CPI with stall / CPI without stall
= 2.376
Performance with a perfect cache is better by a factor of 2.376
Conclusion: with higher CPI cache misses “hurt more” than with
lower CPI
Solution
3.
With doubled clock rate, miss penalty = 2 40 = 80 clock cycles
Stall cycles per instruction = (I 2% 80) + (I 36% 4% 80)
= 2.752 I
So, faster machine with cache miss has CPI = 2 + 2.752 = 4.752
CPU time with stalls / CPU time with perfect cache
= CPI with stall / CPI without stall
= 4.752 / 2 = 2.376
Performance with a perfect cache is better by a factor of 2.376
Conclusion: with higher clock rate cache misses “hurt more” than
with lower clock rate
14
Exploiting Memory Hierarchy
” حسبنا الله سيؤتينا الله من فضله ان الى اللهراغبون ”