CS447 Homework 1 - Due in Class - 2/2
  1. Do questions 1.1 – 1.26 from your textbook.

  2. Suppose we have two machines M1 and M2, and we run a program on each one (not the same program). Consider the following information and measurements made on these machines:

  3.  
    M1
    M2
    Time
    8 seconds
    3 seconds
    Instructions Executed
    250 x 106
    190 x 106
    Clock Rate
    400MHz
    600MHz

    1. Find the instruction execution rate (instructions per second) for each experiment.

    2. Find the clock cycles per instruction (CPI) for each experiement.

  4. Consider two different implementations, M1 and M2, of the same instruction set. There are four classes of instructions (A, B, C, and D) in the instruction set.

  5. M1 has a clock rate of 650MHz and M2 has a clock rate of 900MHz. The average number of cycles for each instruction class and the instruction distribution for a certain program is as follows:

    Class
    CPI on M1
    CPI on M2
    % of Instructions
    A
    8
    6
    35%
    B
    6
    6
    10%
    C
    4
    3
    25%
    D
    2
    3
    30%

    1. How much faster is the program on M2 than on M1?

    2. At what clock rate would M1 have the same performance as the 900MHz M2?

  6. We are interested in two implementations of a machine, one with and one without special floating-point hardware.  Consider a program, P, with the following mix of operations:
floating-point multiply 15%
floating-point add 20%
floating-point divide 5%
integer instructions 60%
Machine MFP (Machine with Floating Point) has floating-point hardware and can therefore implement the floating-point operations directly. It requires the following number of clock cycles for each instruction class:
floating-point multiply 8
floating-point add 5
floating-point divide 25
integer instructions 2
Machine MNFP (Machine with No Floating Point) has no floating-point hardware and so must emulate the floating-point operations using integer instructions. Each integer instruction takes 2 clock cycles. The number of integer instructions needed to implement each of the floating-point operations is as follows:
floating-point multiply 40
floating-point add 25
floating-point divide 60
Both machines have a clock rate of 900MHz. Find the native MIPS ratings for both machines. (That is, determine how many millions of instrucstions are executed per second by each machine when executing this program.) Note, you should calculate the number of program instructions executed per second on each machine. That is, for the machine that emulates floating point instructions with integer instructions, count each floating point instruction as 1, not the number of integer instructions needed to emulate it. This way, it will make sense to compare the MIPS ratings you work out for the two machines.