CPU Performance Assignment
CPU Performance Assignment
Amdahl’s Law:
1
S= 𝑓
(1−𝑓)+( )
𝑘
1.
1 1 1.7 1.7
S= .2 → .2 → → = 1.08974358
(1−.2)+( ) .8+(1.7) 1.36+.2 1.56
1.7
2.
1 1 1.2 1.2
S= .7 → .7 → → = 1.13207547
(1−.7)+( ) .3+( ) .36+.7 1.06
1.2 1.2
.3
1 1 1
S= .1 → → ̅̅̅̅̅̅
= 1.0.81
(1−.1)+( ) .9+.025 .925
4
Wirth 2
4. What would CPI become if we improved branch prediction to a 98% success rate?
5. What would CPI become if we improved the failure penalty to a 1-cycle stall?
Formula:
3∗0.005
=f
(100)+(3∗0.005)
f = .00014997
4.
3∗0.002
= f2
(100)+(3∗0.002)
f2 = .000059996
.00014997
k=
.000059996
???
Wirth 3
6. If the current effective access time is 11ns, what is the current hit rate?
7. What would the effective access time be if we subtracted a flat 5% from the hit rate?
8. What hit rate would we need for an effective access time of 3ns?
Cache Equation:
6.
30 * 𝑡ℎ𝑖𝑡 = 32 – 11
21
𝑡ℎ𝑖𝑡 = → 𝑡ℎ𝑖𝑡 = 0.7 = 𝑡ℎ𝑖𝑡 = 70% , 𝑅𝑚𝑖𝑠𝑠 = 30%
30
7.
8.
3 = 2 + 30 – 30 𝑡ℎ𝑖𝑡 → 30 𝑡ℎ𝑖𝑡 = 32 – 3
29
𝑡ℎ𝑖𝑡 = → 𝑡ℎ𝑖𝑡 = 0.96 → 𝑡ℎ𝑖𝑡 = 96% , 𝑅𝑚𝑖𝑠𝑠 = 4%
30
9. What will the speedup of the SSD over the HDD be when reading 5,000 files totaling
140MB? (Amdahl’s Law will not help you here, but you have enough information to
determine the answer without it.)
10. What will the speedup of the SSD over the HDD be when reading 130 files totaling
1GB? (Amdahl’s Law will not help you here, but you have enough information to
determine the answer without it.)
9.
140
(5000∗HDD+𝑇𝑇 )
𝐻𝐷𝐷
= 140
(5000∗SDD+ )
𝑇𝑇𝑆𝑆𝐷
140
(5000∗.09+ )
60
= 140
(5000∗.0001+ )
500
(450 + 2.33)
=
(0.5 + 0.288)
452.33
=
0.78
= 579.87179
Wirth 5
10.
1000
(130∗.09+ 60 )
= 1000
(130∗.0001+ 500 )
(11.7+16.66)
=
(0.013+2)
28.36
=
2.013
= 14.08842
Assume the chance of a single hard drive failing in a given year is 7%. What are the chances,
over that year, of:
11.
= 13.51%
12.
Wirth 6
= .49%
13.
1 – (P(no discs fail) + P(1 disc fails)) = 1 – ((.934) + 4(.07* .93* .93*.93)) = 0.0267
= 2.67%