Answer:
Answer explained below
Step-by-step explanation:
The time taken by a processor of speed n Hz to finish one cycle is 1/n seconds. CPI is Cycles Per Instruction which indicates the number of cycles taken by an instruction to finish execution.
For P1:
clock rate = 3.5GHz which means time for one cycle = 1/(3.5 x 109) = 0.285 ns
CPI = 1.5
which means time taken to complete one instruction = 0.285 x 1.5 = 0.428 ns
Number of instructions executed in one second = 2.33 x 109 instructions
For P2:
clock rate = 3.0GHz which means time for one cycle = 1/(3.0 x 109) = 0.333 ns
CPI = 1.0
which means time taken to complete one instruction = 0.333 x 1.0 = 0.333 ns
Number of instructions executed in one second = 3 x 109 instructions
For P3:
clock rate = 4.0GHz which means time for one cycle = 1/(4.0 x 109) = 0.25 ns
CPI = 2.2
which means time taken to complete one instruction = 0.25 x 2.2 = 0.55 ns
Number of instructions executed in one second = 1.82 x 109 instructions
a. From the above calculations we can see that processor P2 has the highest performance as it executes the highest number of instructions per second.
b. All the processors execute one program in 10 seconds. Number of instructions executed in 10 seconds = number of instructions in one second x 10. Number of cycles = number of instructions x CPI
For P1:
Number of instructions executed in one program = 2.33 x 1010 instructions
Number of cycles taken by a program = 2.33 x 1010 instructions x 1.5 CPI = 3.5 x 1010cycles
For P2:
Number of instructions executed in one program = 3.0 x 1010 instructions
Number of cycles taken by a program = 3.0 x 1010 instructions x 1.0 CPI = 3.0 x 1010cycles
For P3:
Number of instructions executed in one program = 1.82 x 1010 instructions
Number of cycles taken by a program = 1.82 x 1010 instructions x 2.2 CPI = 4.0 x 1010cycles
c.
Assuming the CPI should be same, To reduce execution time by 30% the processor has to execute the number of instructions it executes in 10 seconds in 7 seconds.
For P1:
Number of instructions executed in one program = 2.33 x 1010 instructions
Number of instructions executed in one second = 2.33 x 1010 / 7 = 3.33 x 109 instructions
this means one instruction is executed in 0.3ns which implies one cycle takes 0.3/1.5 = 0.2 ns
The clock speed should therefore be, 5.0GHz
For P2:
Number of instructions executed in one program = 3.0 x 1010 instructions
Number of instructions executed in one second = 3.0 x 1010 / 7 = 4.28 x 109 instructions
this means one instruction is executed in 0.23ns which implies one cycle takes 0.23/1.0 = 0.23 ns
The clock speed should therefore be, 4.28GHz
For P3:
Number of instructions executed in one program = 1.82 x 1010 instructions
Number of instructions executed in one second = 1.82 x 1010 / 7 = 2.6 x 109 instructions
this means one instruction is executed in 0.385ns which implies one cycle takes 0.385/1.5 = 0.26 ns
The clock speed should therefore be, 3.9GHz