Professional Documents
Culture Documents
Bim305 A1
Bim305 A1
Assignment – 1
This assignment consists of six questions. Submit single PDF file for your answers.
• You have to work ALONE.
• Anyone found cheating will be assigned 0 point.
1. Consider two different implementations, P1 and P2, of the same instruction set. There
are five classes of instructions (A, B, C, D, and E) in the instruction set. The clock rate
and CPI of each class is given below.
P1 1.0 GHz 1 1 2 3 2
P2 1.5 GHz 1 2 3 2 3
If the number of instructions executed in a certain program is divided equally among the
classes of instructions except for class A, which occurs twice as often as each of the others:
Which computer is faster? How much faster is it? (20p)
2. Suppose that there are two implementations of the same instruction set architecture.
Machine A has a clock cycle time of 20ns and an effective CPI of 1.5 for some program,
and machine B has a clock cycle time of 15ns and an effective CPI of 1.0 for the same
program. Which machine is faster for this program, and by how much? (20p)
A 1 2 40%
B 2 3 50%
C 4 4 10%
a. Calculate the average CPI for each machine, M1, and M2. (5p)
b. Calculate the average Millions of Instructions per Second (MIPS) ratings for each
machine, M1 and M2. (5p)
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)? (5p)