Midterm Exam, CSCI 312, Spring 2011


  1. (8 points) Name and describe the factors that influence a programs run time. This discussions should be related to the timing model discussed. (This is not a discussion about CPI, clock speed, ..., but these items should be part of the discussion)
  2. (16 points) Describe and critique each of the following performance benchmarks:
    1. Clock Speed
    2. MIPS
    3. Execution time for a target program
    4. SPEC CPU Benchmark
  3. (5 points each) A program running on a 2GHz processor has the following characteristics:
     FP InstInt Inst Load/Store Inst Branch Inst
    Count6x108 2 x 109 1x109 2x106
    CPI 5 1 3 2
    1. Calculate the CPI for this program on this processor.
    2. Calculate the time for this program on this processor.
  4. (5 points) Represent the instruction addi $t5, $a0, -192 in MPIS as a 32 bit MIPS machine instruction.
  5. (15 points) Label the diagram representing the DB-1 CPU. Describe (in approximately two sentences each) the function of all components of this machine.
  6. (6 points) Describe the steps required to execute the instruction add R3, imm, R1 ( R[R3] ← M[imm] + R[R1]) in the simple (DB-1) CPU.
  7. (5 points) How can a large instruction set be reduced in size. Give examples.
  8. (10 points) Name and describe the major tasks accomplished by an assembler. When possible, give an example of the task as it relates to MIPS assembly language.