Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please answer allquestions and show work. (Intro to Computer Architecture.) Refe

ID: 3864780 • Letter: P

Question

Please answer allquestions and show work. (Intro to Computer Architecture.)

Refer to the following table for the data required.

Arith

Store

Load

Branch

Instructions for a program

500

50

100

100

CPI

1

5

5

2

A.) Calculate execution time of a program on a 2 GHz processor.

B.) Find global CPI of the program.

C.) If number of load instructions can be reduced by one-half, what is the speed up and CPI?

D.) If number of store and arithmetic instructions can be reduced by one-half, what is the speed up

and CPI?

Arith

Store

Load

Branch

Instructions for a program

500

50

100

100

CPI

1

5

5

2

Explanation / Answer

A.) using the formula,

CPU time = (Instruction count x CPI) / clock rate
Arith: CPU Time = (500 x 1) / 2 x 109 = .00000025s
Store: CPU Time = (50 x 5) / 2 x 109 = .000000125s
Load: CPU Time = (100 x 5) / 2 x 109 = .00000025s
Branch: CPU Time = (100 x 2) / 2 x 109 = .0000001s

Thus, Execution Time = .00000025s + 0.000000125s + .00000025s + .0000001s = .000000725s = 725 x 10-9s

B.) Percentage of instructions for Arith, Store, Load, Branch : 67%, 7%, 13%, 13%

TCPI = (0.67 x 106 x 1) / 2 + (0.07 x 106 x 5) / 2 + (0.13 x 106 x 5) / 2 + (0.13 x 106 x 2) / 2

= (1.93 x 106) / 2

Global CPI = 1.93

C.) Load instructions are reduced by half, hence, number of Load instructions = 50

Execution Time = .00000025s + 0.000000125s + .000000125s + .0000001s = .0000006s = 600 x 10-9s

Speed Up = Execution time when load is 100 / Execution time when load is 50

= (725 x 10-9) / (600 x 10-9) = 1.21

New instructions percentage for arith, store, load, branch: 72%, 7%, 7% , 14%

New Load CPI = 0.07 x 5 = 0.35

TCPI = (0.72 x 106 x 1) / 2 + (0.07 x 106 x 5) / 2 + (0.07 x 106 x 5) / 2 + (0.14 x 106 x 2) / 2

= (1.7 x 106) / 2

Global CPI = 1.7

D.) Arith instructions are reduced by half, hence, number of Arith instructions = 250

Store instructions are reduced by half, hence, number of Store instructions = 25

Execution Time = .000000125s + .0000000625s + .00000025s + .0000001s = .0000006s = 537.5 x 10-9s

Speed Up = Execution time when arith is 500 and store is 50 / Execution time when arith is 250 and store is 25

= (725 x 10-9) / (537.5 x 10-9) = 1.35

New instructions percentage for arith, store, load, branch: 53%, 5%, 21% , 21%

New Arith CPI = 0.53 x 1 = 0.53

New Store CPI = 0.05 x 5 = 0.25

TCPI = (0.53 x 106 x 1) / 2 + (0.05 x 106 x 5) / 2 + (0.21 x 106 x 5) / 2 + (0.21 x 106 x 2) / 2

= (2.25 x 106) / 2

Global CPI = 2.25