Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Performance assessment. Consider two different implementations, M1 and M2 , of t

ID: 3839035 • Letter: P

Question

Performance assessment.

Consider two different implementations, M1 and M2 , of the same instruction set. There are three different classes of instructions (A, B, and C) in the instruction set. Implmentation M1 has a clock rate 6Ghz, and M2 has a clock rate of 3GHz. The average number of cycles for each instruction class on M1 and M2 is given in the table below. The table also contains a summary of average proportion of instruction classes generated by two different compilers, C1 and C2. Assume that each compiler uses the same number of instructions for a given program but that the instruction mix is as described in the table.

(a) If you purchase M1, which compiler would you use?

(b) If you purchase M2, which compiler would you use?

(c)Which computer and compiler would you purchase if all other criteria were identical, including

cost.

Show the decision procedure.

Class of instructions

CPI on M1

CPI on M2

C1 usage

C2 usage

A

2

1

50%

40%

B

3

2

25%

20%

C

5

2

25%

40%

Class of instructions

CPI on M1

CPI on M2

C1 usage

C2 usage

A

2

1

50%

40%

B

3

2

25%

20%

C

5

2

25%

40%

Explanation / Answer

M1 clock rate = 6Ghz = 6 X109
M2 clock rate = 3Ghz = 3 X109

NOW for C1 Compiler Performance of M1

M1Cycles = (5
Class of A inst * 2 CPI ) + (2.5 Class of B inst * 3 CPI ) + (2.5 Class of C inst *5CPI )
= 10 + 7.5 + 12.5 = 20 Cycles

M1 execution time = 20 * ( 1 / ( 6 X109 ) ) = 3.33 nsec


NOW for C2 Compiler , Performance of M1 is

M1Cycles = (4 Class of A inst * 2 CPI ) + (2 Class of B inst * 3 CPI ) + (4 Class of C inst *5CPI )
= 8 + 6 + 20 = 34 Cycles

M1 execution time = 34 * ( 1 / ( 6 X109 ) ) = 5.67 nsec


(a) If you purchase M1, which compiler would you use?
I would choose C1 because M1 performance on C1 is good as it takes les time to execute same instruction [Answer]

=====================================================================

NOW for C1 Compiler Performance of M2

M2Cycles = (5
Class of A inst * 1 CPI ) + (2.5 Class of B inst * 2 CPI ) + (2.5 Class of C inst *2CPI )
= 5 + 5 + 5 = 15 Cycles

M2 execution time = 20 * ( 1 / ( 3 X109 ) ) = 6.67 nsec


NOW for C2 Compiler , Performance of M2 is

M2Cycles = (4 Class of A inst * 1 CPI ) + (2 Class of B inst * 2CPI ) + (4 Class of C inst *2 CPI )
= 4 + 4 + 8 = 16 Cycles

M2 execution time = 16 * ( 1 / ( 3 X109 ) ) = 5.33 nsec


(a) If you purchase M2, which compiler would you use?
I would choose C2 because M2 performance on C2 is good as it takes les time to execute same instruction [Answer]
==================================================================

C)
Comparing M1 and M2 on C1 compiler , We can see that M1 takes less time than M2
i.e M1/M2 = 3.33 / 6.67 = 0.5
Comparing M1 and M2 on C2 compiler , We can see that M2 takes less time than M1
i.e 5.67/ 5.33 = 1.67

We can see that M1 ratio is less 0.5 < 1.67 , SO we will choose M1 and C1 compiler as it performs better than M2