Consider two different implementations, M1 and M2, of the same instruction set. There are three classes of instructions (A, B, and C) in the instruction set. M1 has a clock rate of 80 MHz and 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:______
a. Calculate the average CPI for each machine, M1, and M2.
b. Which implementation (M1 or M2) is faster?
c. Find the clock cycles required for both processors.

Respuesta :

Answer:

a) the average CPI for machine M1 = 1.6

the average CPI for machine M2 = 2.5

b) M1 implementation is faster.

c) the clock cycles required for both processors.52.6*10^6.

Explanation:

(a)

The average CPI for M1 = 0.6 x 1 + 0.3 x 2 + 0.1 x 4

= 1.6

The average CPI for M2 = 0.6 x 2 + 0.3 x 3 + 0.1 x 4

= 2.5

(b)

The average MIPS rate is calculated as: Clock Rate/ averageCPI x 10^6

Given 80MHz = 80 * 10^6

The average MIPS ratings for M1 = 80 x 10^6  / 1.6 x 10^6

= 50

Given 100MHz = 100 * 10^6

The average MIPS ratings for M2 = 100 x 10^6 / 2.5 x 10^6

= 40

c)

Machine M2 has a smaller MIPS rating

Changing instruction set A from 2 to 1

The CPI will be increased to 1.9 (1*.6+3*.3+4*.1)

and hence MIPS Rating will now be (100/1.9)*10^6 = 52.6*10^6.