A program has 1024 instructions and runs on a 20 GHz process
A program has 1024 instructions, and runs on a 2.0 GHz processor in 20 seconds. What is its CPI?
Solution
Answer:
We have given I = 1024 , CR = 2.0Hz , execution time = 20 seconds
We know that , execution time = CPI * I * 1/CR
execution time x CR = CPI x I
=> CPI = execution time x CR / I = 20 x 2/1024 = 0.0390625
