Consider three different processors P1, P2, and P3 executing the same instructio
ID: 3740965 • Letter: C
Question
Consider three different processors P1, P2, and P3 executing the same instruction set. P1 has a 3 GHz clock rate and a CPI of 1.5. P2 has a 2.5 GHz clock rate and a CPI of 1.0. P3 has a 4.0 GHz clock rate and has a CPI of 2.0.
a) Which processor has the highest performance expressed in instructions per second?
b) If processor P1 executes a program in 10 seconds, find the number of cycles and the number of instructions.
c) For processor P2, we are trying to reduce the execution time by 30% but this leads to an increase of 20% in CPI. What clock rate (for P2) should we have to get this time reduction?
Explanation / Answer
Solution:
Let's calculate the execution time for each of the processor considering that the number of instruction for each is same.
For P1:
Execution time= CPI * 1/clock rate = 1.5/(3*10^9)= 5e-10 seconds= 0.5 ns
For P2:
Execution time= CPI * 1/clock rate = 1.0/(2.5*10^9)= 4e-10= = 0.4 ns
For P3:
Execution time= CPI * 1/clock rate = 2.0/(4*10^9)= 5e-10= = 0.5 ns
a)
In instruction per second
P2 will perform
1/(0.4*10^-9)= 2500000000 = 2500 MIPS
the other two are 200 MIPS
b)
1 cycle gets completed in 0.5 ns
so in 10 sec
10/0.5*10^-9= 20000000000 cycles -instructions
CPI for P1 is 1.5
so
20000000000/1.5= 13333333333.3 instructions
c)
Execution time= CPI * 1/clock rate = 1.0/(2.5*10^9)= 4e-10= = 0.4 ns
=> 0.4= 1.2/x
=> x= 1.2/0.4= 3 Ghz.
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)