Homework 1 # 1.5) A. P1= 3.0Ghz & CPI - 1.5 P1: 3.0GHz / 1.5 = 2 * 10^9 instructions per second P2= 2.5Ghz & CPI - 1 P2: 2.5GHz / 1 = 2.5 * 10^9 instructions per second P3= 4.0Ghz & CPI - 2.2 P3: 4.0 GHz / 2.2 = 1.81 * 10^9 instructions per second ( P2 is the highest one.) B. Cycles: P1: 3GHz * 10 = 3 * 10^10 cycles P2: 2.5GHz * 10 = 2.5 * 10^10 cycles P3: 4GHz * 10 = 4 * 10^10 cycles Num of instructions: P1: 3GHz * 10 / 1.5 = 2 * 10^10 instructions P2: 2.5GHz * 10 / 1.0 = 2.5 * 10^10 instructions P3: 4GHz * 10 / 2.2 = 1.82 * 10^10 instructions C. Execution time * 0.7 = (Num of instructions * CPI * 1.2) / New Clock rate New Clock rates: P1: 3GHz * 1.71 = 5.13 GHz P2: 2.5GHz * 1.71 = 4.27 GHz P3: 4GHz * 1.71 = 6.84 GHz # 1.6) A. Class A : 10^5 Class B : 2 X 10^5 Class C : 5 × 10^5 Class D : 2 × 10^5 Time = No. instr. × CPI/clock rate Total time P1 = (10^5 + 2 * 10^5 * 2 + 5 * 10^5 * 3 + 2* 10^5 * 3) /(2.5 * 10^9) = 10.4 ×10^−4s Total time P2 = (10^5 * 2 + 2 * 10^5 * 2 + 5 * 10^5 * 2 + 2 * 10^5 * 2) / (3 * 10^9) = 6.66*10^−4s CPI(P1) = 10.4 * 10^−4 × 2.5 * 10^9/10^6 = 2.6 CPI(P2) = 6.66 * 10^−4 × 3 * 10^9/10^6 = 2.0 B. clock cycles (P1) = 10^5 * 1 + 2 * 10^5 * 2 + 5 * 10^5 * 3 + 2 * 10^5 * 3 = 26 * 10^5 clock cycles (P2) = 10^5 * 2 + 2 * 10^5 * 2 + 5 * 10^5 * 2 + 2 * 10^5 * 2 = 20 * 10^5 # 1.7) A. Compiler A CPI = 1.1 / (1.0E9 × 1.0E-9) = 1.1 Compiler B CPI = 1.5 / (1.2E9 × 1.0E-9) = 1.25 B. 1.5s/1.1s = 1.36 B’s processor is 1.36 times faster than A. C. Cycles = CPI * instructions = 1.1 X 6.0 X 108 = 6.6 X 108 Time = 6.6 X 108 X 1ns = 0.66s Speed up for A: 1.1s / 0.66s = 1.67 Speed up for B: 1.5s / 0.66s = 2.27 ~~ # 1.11) 1. CPI(bzip2)=0.94 2. SPECratio(bzip2)=9650/750=12.86 3. 10% increase. 4. CPUtime(after)/CPU time(before)= 1.1*1.05=1.155. Thus, CPU time is increased by 15.5%. 5. SPECratio(after)/SPECratio(before)=CPU time(before)/CPU time(after)=1/1.1555 = 0.86. The SPECratio is decreased by 14%. 6. CPI= 1.37. 7. Clock rate ratio = 4GHz/3GHz= 1.33 CPI at 4GHz=1.37,CPI at 3GHz=0.94, ratio= 1.45 the number of instructions are reduced by 15%. 8. 700/750=0.933. CPU time reduction is 6.7%. 9. Number of instruments= 2146*10^9. 10. Clock rate new= No.instr * CPI/0.9 * CPU time = 1/0.9 clock rate old= 3.33GHz 11. Clock rate new= No. instr * 0.85 * CPI/0.80 * CPU time = 0.85/0.80 clock rate old= 3.18GHz. # 1.14) A. clock cycles = 512*10^6. T CPU= 0.256s. CPI improved fp=(256−462)/50<0, thus not possible B. CPI improved l/s=(256−198)/80=0.725 C. CPI int= 0.6*1=0.6 CPI fp= 0.6*1=0.6 CPI l/s= 0.7*4=2.8 CPI branch= 1.4 TCPU before improvement=0.256s TCPU after improvement=0.171s
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up