Processor Performance

Answer & solution
Official answer: 3.0
Multiply each class count by its cycles per instruction before adding. Branches use 2·2.25×108=4.5×108 cycles; loads use 5·1.20×108=6.0×108; stores use 4·1.65×108=6.6×108; arithmetic uses 3·1.30×108=3.9×108. Total cycles are (4.5+6.0+6.6+3.9)×108=2.1×109.
CPU time equals total cycles times cycle duration, so T_cycle=6.3/(2.1×109)=3×10−9 seconds=3.0 ns. Equivalently, the instruction-count-weighted average CPI is 2.1×109/(6.4×108)=3.28125, leading to the same result. A simple arithmetic average of the four CPIs would be incorrect because the instruction counts differ. The corresponding clock frequency is approximately 333.33 MHz, a useful unit check. Answer: 3.0.