Midterm Exam, CSCI 312, Spring 2011
- Make sure you answer each question completely and thoughtfully.
- Please make sure your answers are clearly labeled with the question number.
- Please write neatly and make any diagrams as neat as you can. If I can't read it, it is wrong.
- Point values are listed by each question.
- (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)
- (16 points) Describe and critique each of the following performance benchmarks:
- Clock Speed
- MIPS
- Execution time for a target program
- SPEC CPU Benchmark
- (5 points each) A program running on a 2GHz processor has the following characteristics:
| FP Inst | Int Inst | Load/Store Inst | Branch Inst |
Count | 6x108
| 2 x 109 | 1x109 | 2x106 |
CPI | 5 | 1 | 3 | 2 |
- Calculate the CPI for this program on this processor.
- Calculate the time for this program on this processor.
- (5 points) Represent the instruction addi $t5, $a0, -192 in MPIS as a 32 bit MIPS machine instruction.
- (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 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.
- (5 points) How can a large instruction set be reduced in size. Give examples.
- (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.