31 August, 14:53

# Consider three different processors P1, P2, and P3 executing the same instructions set. P1 has a 3 GHz clock rate and a CPI of 1.5. P2 has a 2.5 GHz and CPI of 1.0. P3 has a 4.0 GHz clock rate and has a CPI of 2.2.a. which processor has the highest performance expressed in instruction per second?b. If the processors each execute a program in 10 seconds, find the number of cycles and the number of instructions.c. We are trying to reduce the execution time by 30% but this leads to an increase of 20% in the CPI. What clock rate should we have to get this time reduction.

+5
1. 31 August, 18:40
0

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