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

Assume that for a given program 70% of the executed instructions are arithmetic,

ID: 3778463 • Letter: A

Question

Assume that for a given program 70% of the executed instructions are arithmetic, 10% are load/store, and 20% are branch. Given this instruction mix and the assumption that an arithmetic instruction requires two cycles, a load/store instruction takes six cycles, and a branch instruction takes three cycles, find the average CPI. For a 25% improvement in performance, how many cycles, on average, may an arithmetic instruction take if load/store and branch instructions are not improved at all? For a 50% improvement in performance, how many cycles, on average, may an arithmetic instruction take if load/store and branch instructions are not improved at all?

Explanation / Answer

In the above question I'm assuming CPU clock rate as 1GHz.
Part1: 70*2+10*6+20*3 = 260 cycles
   CPU time = CPU Clock Cycles / Clock Rate;
   CPU time = 260/10^9 = 260*10^(-9) sec
Part1: 70*(100/125)*2+10*6+20*3 =232 cycles
   CPU time = CPU Clock Cycles / Clock Rate;
   CPU time = 232/10^9 = 232*10^(-9) sec
Part1: 70*(100/150)*2+10*6+20*3 = 212 cycles
   CPU time = CPU Clock Cycles / Clock Rate;
   CPU time = 212/10^9 = 212*10^(-9) sec