75.5k views
3 votes
Consider two different implementations, M1 and M2, of the same instruction set. There are five classes of instructions (A, B, C, D, and E) in the instruction set M2 has a clock rate of 3,300 MHz. The average number of cycles for each instruction class and their frequencies (for a typical program) are as follows:

Instruction Class Machine M1 Machine M2 Frequency
Cycles/Instruction
Frequency
A 1 2 60%
B 2 3 30%
C 4 4 10%
(a) Calculate the average CPI for each machine, M1, and M2.
(b) Calculate the average MIPS ratings for each machine, M1 and M2.
(c) Which machine has a smaller MIPS rating? Which individual instruction class CPI do you need to change, and by how much, to have this machine have the same or better performance as the machine with the higher MIPS rating (you can only change the CPI for one of the instruction classes on the slower machine)?

User Ruffrey
by
6.2k points

1 Answer

6 votes

Answer:

Kindly check explanation

Step-by-step explanation:

Given the table :

Class___M1____M2____frequency

A______1______2______60%

B______2______3______30%

C______4______4______10%

A) Average CPI for each machine M1 and M2:

Frequency * cycles :

For M1:

(60% × 1) + (30% × 2) + (10% × 4)

0.6 + 0.6 + 0.4 = 1.6

For M2:

(60% × 2) + (30% × 3) + (10% × 4)

1.2 + 0.9 + 0.4 = 2.5

Calculate the average MIPS ratings for each machine, M1 and M2.

MIPS = clockrate / average CPI × 10^6

Clock rate for M1 isnt given

However, clock rate for M2 = 3,300

For M2 = (3300/2.5 ×10^6 = 0.00132

User Saon
by
6.3k points