Assume a program requires the execution of 50 x 106 FP instructions, 110 x 106 INT instructions, 80 x 106 L/S instructions, and 16 x 106 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. 1. By how much must we improve the CPI of FP instructions if we want the program to run two times faster? 2. By how much must we improve the CPI of L/S instructions if we want the program to run two times faster? 3. By how much is the execution time of the program improved if the CPI of INT and FP instructions is reduced by 40% and the CPI of L/S and Branch is reduced by 30%?

Respuesta :

Answer:

Part A:

[tex]1.3568*10^{-5}=\frac{5300* New\ CPI_1+11660*1+8480*4+1696*2}{2*10^9\ Hz} \\ New\ CPI_1=-4.12[/tex]

CPI cannot be negative so it is not possible to for program to run two times faster.

Part B:

[tex]1.3568*10^{-5}=\frac{5300*1+11660*1+8480*New\ CPI_3+1696*2}{2*10^9\ Hz} \\ New\ CPI_3=0.8[/tex]

CPI reduced by [tex]1-\frac{0.8}{4} = 0.80[/tex]=80%

Part C:

New Execution Time=[tex]\frac{5300*0.6+11660*0.6+8480*2.8+1696*1.4}{2*10^9\ Hz}=1.81472*10^{-5}\ s[/tex]

Increase in speed=[tex]1-\frac{1.81472*10^{-5}}{2.7136*10^{-5}} =0.33125= 33.125\%[/tex]

Explanation:

FP Instructions=50*106=5300

INT  Instructions=110*106=11660

L/S  Instructions=80*106=8480

Branch  Instructions=16*106=1696

Calculating Execution Time:

Execution Time=[tex]\frac{\sum^4_{i=1} Number\ of\ Instruction*\ CPI_{i}}{Clock\ Rate}[/tex]

Execution Time=[tex]\frac{5300*1+11660*1+8480*4+1696*2}{2*10^9\ Hz}[/tex]

Execution Time=[tex]2.7136*10^{-5}\ s[/tex]

Part A:

For Program to run two times faster,Execution Time (Calculated above) is reduced to half.

New Execution Time=[tex]\frac{2.7136*10^{-5}}{2}=1.3568*10^{-5}\ s[/tex]

[tex]1.3568*10^{-5}=\frac{5300* New\ CPI_1+11660*1+8480*4+1696*2}{2*10^9\ Hz} \\ New\ CPI_1=-4.12[/tex]

CPI cannot be negative so it is not possible to for program to run two times faster.

Part B:

For Program to run two times faster,Execution Time (Calculated above) is reduced to half.

New Execution Time=[tex]\frac{2.7136*10^{-5}}{2}=1.3568*10^{-5}\ s[/tex]

[tex]1.3568*10^{-5}=\frac{5300*1+11660*1+8480*New\ CPI_3+1696*2}{2*10^9\ Hz} \\ New\ CPI_3=0.8[/tex]

CPI reduced by [tex]1-\frac{0.8}{4} = 0.80[/tex]=80%

Part C:

[tex]New\ CPI_1=0.6*Old\ CPI_1=0.6*1=0.6\\New\ CPI_2=0.6*Old\ CPI_2=0.6*1=0.6\\New\ CPI_3=0.7*Old\ CPI_3=0.7*4=2.8\\New\ CPI_4=0.7*Old\ CPI_4=0.7*2=1.4[/tex]

New Execution Time=[tex]\frac{\sum^4_{i=1} Number\ of\ Instruction*\ CPI_{i}}{Clock\ Rate}[/tex]

New Execution Time=[tex]\frac{5300*0.6+11660*0.6+8480*2.8+1696*1.4}{2*10^9\ Hz}=1.81472*10^{-5}\ s[/tex]

Increase in speed=[tex]1-\frac{1.81472*10^{-5}}{2.7136*10^{-5}} =0.33125= 33.125\%[/tex]