The following table shows the number of instructions for a p
     The following table shows the number of instructions for a program. Assuming that art instructions take 1 cycle, load and store 5 cycles, and branches 2 cycles, what is the execution time of the program in a 2 GHz processor? Find the CPI for the program. If the number of load instructions can be reduced by one half, what is the speedup and the CPI? 
  
  Solution
1) Execution time = (Number of instructions * Number of Clocks per instructions)/Clock Rate
= (650*1 + 100*5 + 600*5 +50*2) * 0.5×10-9 =2125*10-9 Sec
2) CPI(Cycles Per Instruction)=2125/1400=1.517 Cycles/Instruction
3) Speedup = PerformanceA / PerformanceB = Execution TimeB / Execution TimeA =1375/2125=0.647
CPI=1375/1100=1.2336 Cycles/Instruction
Execution time B Can be calculated same as above execution time is calculated. The difference is here we reduce the load instruction to 300.

