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

2.46 Assume for a given processor the CPI of arithmetic instructions is 1, the C

ID: 3909510 • Letter: 2

Question

2.46 Assume for a given processor the CPI of arithmetic instructions is 1, the CPI of load/store instructions is 10, and the CPI of branch instructions is 3. Assume a program has the following instruction breakdowns: 500 million arithmetic instructions, 300 million load/store instructions, 100 million branch instructions. 2.46.1 [5] Suppose that new, more powerful arithmetic instructions are added to the instruction set. On average, through the use of these more powerful arithmetic instructions, we can reduce the number of arithmetic instructions needed to execute a program by 25%, and the cost of increasing the clock cycle time by only 10%. Is this a good design choice? Why? 2.46.2 [5] Suppose that we find a way to double the performance of arithmetic instructions. What is the overall speedup of our machine? What if we find a way to improve the performance of arithmetic instructions by 10 times?

Explanation / Answer

Given CPI of ,

Arthematic Instructions = 1

Load / store Instructions = 10

Branch Instructions = 3

-----------------------------------------------------------------------------------------------

Given Breakdown of instructions,

Arthematic Instructions = 500 million

Load / store Instructions = 300 million

Branch Instructions = 100 million

-------------------------------------------------------------------------------------------------------------

Execution Time = (Instructions/Program) x (Cycles / Instruction) x CLOCK CYCLE TIME

T = IP x CPI x CT

T = Program execution time (seconds/program)

IP = Instructions / Program

CPI = Cycles per Instruction

CPU Clock cycle time (CT)= seconds/cycle

number of cycles (C) = (Instructions/program) x CPI = IP x CPI

Instructions Per Cycle ( IPC) = 1/CPI

execution time = ((500 x 1) + (300 x 10) + (100 x 3)) x clock cycle = 500 + 3000 + 300

= 3800 million clock cycle time = 3800 x 106 clock cycle time

--------------------------------------------------------------------------------------------------------------------

2.46.1)

Reduction in use of arthematic program is 25% = 0.25

so 500 x 0.75 = 375

execution time = ((375 x 1) + (300 x 10) + (100 x 3)) x clock cycle

= 375 + 3000 + 300 = 3675 million clock cycle time = 3675 x 106 clock cycle time.

increasing clock cycles by 10% gives us

execution time = (3675 x1.10) = 4042.5 million clock cycle time = 4042 x 106 clock cycle time

------------------------------------------------------------------------------------------------------------------------

2.46.2)

Execution Time = ((500 x 0.5) + (300 x 10) + (100 x 3)) = 250 + 3000 + 300
= 3550 million clock cycles.

Speed up = 3800 / 3550 = 1.07

Execution time = ((500 x 0.1) + (300 x 10) + (100 x 3)) = 50 + 3000 + 300
= 3350 million clock cycle

Speed up = 3800 / 3350 = 1.13