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?

Respuesta :

Answer:

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

Explanation:

Processor clock rate = 2 GHz

Execution Time =   ∑  [tex](\frac{Clock cyles}{Clock rate})[/tex]

Clock cycles can be determined using following formula

Clock cycles = ([tex]CPI_{FP}[/tex] x  No. FP instructions )+ ( [tex]CPI_{INT}[/tex] x No. INT instructions) + ( [tex]CPI_{L/S}[/tex]  x No. L/S instructions ) + ( [tex]CPI_{branch}[/tex] x No. branch instructions)

Clock cycles = ( 50 x [tex]10^{6}[/tex] x 1) + (  110 x [tex]10^{6}[/tex] x 1) + ( 80 x [tex]10^{6}[/tex] x 4) + ( 16 x [tex]10^{6}[/tex] x 2)

Clock cycles = 512 x 10⁶

So,Initial Execution time for FP instructions is,

    = [tex]\frac{512(10^{6}) }{2(10^{9}) }[/tex]

 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

([tex]\frac{Clockcycles}{2}[/tex] )=   ([tex]CPI_{FP}[/tex] x  No. FP instructions )+ ( [tex]CPI_{INT}[/tex] x No. INT instructions) + ( [tex]CPI_{L/S}[/tex]  x No. L/S instructions ) + ( [tex]CPI_{branch}[/tex] x No. branch instructions)

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

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

[tex]CPI_{FP improved}[/tex] x 50 x [tex]10^{6}[/tex]  =  - 206 x [tex]10^{6}[/tex]

[tex]CPI_{FP improved}[/tex]  = - 206 x [tex]10^{6}[/tex] / 50 x [tex]10^{6}[/tex]

[tex]CPI_{FP improved}[/tex] = - 4.12 < 0