Due date: On or before Tuesday, February 13, 2025 Absolutely no copying others’ works |
Name: ____Professor Hu____ |
Clock rate | CPI Class A | CPI Class B | CPI Class C | |
---|---|---|---|---|
P1 | 3.0 GHz | 3 | 2 | 2 |
P2 | 3.5 GHz | 4 | 3 | 2 |
global CPI = execution time × clock rate ÷ number of instructions
, where the execution time
can be found from the solution of the previous question.Instruction Count×109 | Execution Time (seconds) | Reference Time (seconds) |
---|---|---|
1800 | 600 | 5000 |
CPI = Clock rate × CPU time ÷ Instruction count Clock rate = 1 ÷ Cycle time = 1 ÷ (0.25×10-9 seconds/cycle) = 4.0×109 cycles/second = 5.0 GHz CPI = (4.0×109 cycles/second) × (600 seconds) ÷ (1800×09 instructions) = 1.33 cycles/instruction
SPECratio = Reference time ÷ Execution time SPECratio = 5000 / 600 = 8.33
[(CPU timeafter - CPU Timebefore) ÷ CPU timebefore] × 100% = [(Instruction countafter × CPIafter ÷ Clock rateafter – Instruction countbefore × CPIbefore ÷ Clock ratebefore) ÷ (Instruction countbefore × CPIbefore ÷ Clock ratebefore)] × 100%Therefore, the increase in CPU time is 600 seconds × 20% = 120 seconds.
= [(1.20×Instruction countbefore × CPIbefore ÷ Clock ratebefore – Instruction countbefore × CPIbefore ÷ Clock ratebefore) ÷ (Instruction countbefore × CPIbefore ÷ Clock ratebefore)] × 100% = 20%