A program’s instruction mix is 50% class A (CPI 1), 30% class B (CPI 2) and 20% class C (CPI 3). What is the average CPI?
Correct answer C. 1.7
Explanation
Average CPI is the frequency-weighted sum: 0.5 x 1 + 0.3 x 2 + 0.2 x 3 = 0.5 + 0.6 + 0.6 = 1.7. Taking a simple average of the three CPIs gives 2.0, which ignores how often each class appears. Adding the CPIs (6.0) is meaningless. Weighting by frequency is what makes CPI reflect the actual program.
Answer checked How we write and check questions
Discussion