For the following questions, assume that for a given program 70% of the executed
ID: 3840288 • Letter: F
Question
For the following questions, assume that for a given program 70% of the executed instructions are arithmetic, 10% are load/store, and 20% arc branch. a. Given tins 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. b. 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? c. 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 air?Explanation / Answer
a)
Average CPI can be calculated as :
( % of Arithmetic inst. )*2 + (% of load inst.)*6 + (% of branch inst. )*3 = 0.7*2 + 0.1*6 + 0.2*3 = 1.4 + 0.6 + 0.6 = 2.6 cycles per instruction on average
i.e. CPI = 2.6
b)
For 25% improvement, CPI should now be 2.6*0.75 ( improved by 25%, left is 75% of actual 2.6 ) i.e. CPI = 1.95
Average CPI = 1.2 + (0.7)*( average cycles arithmetic instructions take ) = 1.95
i.e. average cycle arithmetic instructions should take = 1.0714
c)
For 50% improvement in CPI,
Average CPI = 1.3 = 1.2 + (0.7)*( average cycles arithmetic instructions take )
i.e. average cycle arithmetic instructions should take = 0.1428
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.