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

Consider two different hardware implementations M1 and M2 of the same instructio

ID: 3757282 • Letter: C

Question

Consider two different hardware implementations M1 and M2 of the same instruction set. There are three classes F, I and N of instructions in the instruction set. M1's clock rate is 600 MHz and M2's clock cycle is 2 ns The ave rage CPI for the three instruction classes on M1 and M2 are as follows. Instruction Cla CPI for M2 Comments 4.0 3.5 Floating-point 5.0 Integer Arithm etic 2.0 Non-arithmeti 2.4 If 50% of all instructions executed in a certain program are from Class N, and the rest are divided equally among F and I, which machine is faster and by what factor? (5 points)

Explanation / Answer

Let us consider for easy calculation that there are 10 instruction of class N, 5 instruction from class F and 5 from class I.

Then number of cycles required by M1

= 5 × 5.0 + 5 × 2.0 + 10×2.4 = 25 + 10 + 24 = 59 cycles

Number of cycles required by M2

= 5 × 4.0 + 5 × 3.5 + 10 × 1.2 = 20+17.5+12 = 49.5 cycles

Clock cycle of M1 = 1/frequency = 1/(600 × 106) = 5/3 ns

Clock cycle of M2 = 2 ns

Total time required by M1 = 59×5/3 = 98.33 ns

Total time required by M2 = 49.5 × 2 = 99 ns

Clearly M1 takes less than M2. Hence M1 is more faster than ME and the speedup factor is 99/98.33