We have two different computers with the same instruction set. There are three classes of instructions (A, B, and C) in the instruction set. Computer M1 has a clock rate of 80 MHz and Computer M2 has a clock rate of 100 MHz. The average number of cycles for each instruction class and their frequencies (for a typical program) are as follows:
Instruction Class Machine M1 Cycles/Instruction Class Machine M2 Cycles/Instruction Class Frequency
Class M1 Cycles/Instrctn Class M2 Cycles/Instrctn Class Frequency
A 1 2 60%
B 2 3 30%
C 4 4 10%
Calculate the average CPI for each machine, M1 and M2.
My initial hunch would be to just do something like M1: .6*1+.3*2+.1*4 = 1.6/3=.53 average for M1 but that makes no sense.