EEE230 Online
Performance Practice Problems
1. Consider three different processors P1, P2, and P3 executing the same instruction set with the clock rates and CPIs as below.
a. Given the same program, which processor has the highest performance?
b. If the processors each execute a different program in 10 seconds, what is the number of
instructions executed for each processor?
2. How many clock cycles are required to execute a program in 10 seconds on a computer with a clock cycle time of 400ps?
3. What is the CPI for a program that executes 1010 instructions of a program in 5 seconds with a clock rate of 3 GHz?
4. A program has the following distribution of instructions.
Assume that arithmetic instructions take 1 cycle, load and store 5 cycles and branch 2 cycles.
a. What is the average CPI for this program?
b. What is the execution time of the program on a machine with a 2GHz clock?
Answers
1.
a. P2
b. P1 = 13.33 x 10 9 , P2 = 15 x 10 9 , P3 = 12 x 10 9
2. Clock cycles = 10 sec / 400 ps = 10 sec / (400 x 10-12 sec) = 2.5 x 1010
3. 5 = 1010 x CPI / (3 x 109), CPI = 1.5
4.
a. 1.93 b. 675ns
Processor
Clock rate
CPI
P1
2 GHz
1.5
P2
1.5 GHz
1.0
P3
3 GHz
2.5
# of Arithmetic Instructions
# of Store Instructions
# of Load Instructions
# of Branch Instructions
500
50
100
50