43.0k views
5 votes
Assume a program requires the execution of 50 x 10^6 FP instructions, 110 x 10^6 INT instructions, 80 x 10^6 Load/Store (L/S) instructions and 16 x 10^6 branch instructions. The CPI for each type of instruction is 1, 1, 4 and 2, respectively. Assume that the processor has a 2 GHz clock rate.By how much must we improve the CPI of FP instructions if we want the program to run two times faster?

User Nerdenator
by
3.6k points

1 Answer

5 votes

Answer:

We can not improve CPI of FP instructions when we run the program two times faster because it would be negative.

Step-by-step explanation:

Processor clock rate = 2 GHz

Execution Time = ∑
((Clock cyles)/(Clock rate))

Clock cycles can be determined using following formula

Clock cycles = (
CPI_(FP) x No. FP instructions )+ (
CPI_(INT) x No. INT instructions) + (
CPI_(L/S) x No. L/S instructions ) + (
CPI_(branch) x No. branch instructions)

Clock cycles = ( 50 x
10^(6) x 1) + ( 110 x
10^(6) x 1) + ( 80 x
10^(6) x 4) + ( 16 x
10^(6) x 2)

Clock cycles = 512 x 10⁶

So,Initial Execution time for FP instructions is,

=
(512(10^(6)) )/(2(10^(9)) )

Initial execution Time = 256 x 10⁻³

For 16 processors ,

clock cycle = 512 x 10⁶

Execution Time = 256 x 10³

To run the program two times faster, half the number of clock cycles

(
(Clockcycles)/(2) )= (
CPI_(FP) x No. FP instructions )+ (
CPI_(INT) x No. INT instructions) + (
CPI_(L/S) x No. L/S instructions ) + (
CPI_(branch) x No. branch instructions)


CPI_(FP improved) x No. FP instructions = (
(Clockcycles)/(2) ) -[ (
CPI_(INT) x No. INT instructions) + (
CPI_(L/S) x No. L/S instructions ) + (
CPI_(branch) x No. branch instructions)]


CPI_(FP improved) x 50 x
10^(6) = (
(512(10)^(6) )/(2) ) - [ ( 110 x
10^(6) x 1) + ( 80 x
10^(6) x 4) + ( 16 x
10^(6) x 2)]


CPI_(FP improved) x 50 x
10^(6) = - 206 x
10^(6)


CPI_(FP improved) = - 206 x
10^(6) / 50 x
10^(6)


CPI_(FP improved) = - 4.12 < 0

User Scribble
by
4.2k points