Midterm Exam, CSCI 312, Spring 2010
- 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.
- (5 points) What is an instruction set architecture (ISA)?
- (5 points) Why is clock speed an insufficient measure of performance?
- (10 points) Describe the impact of each of the following on performance.
- Algorithm
- Programmer
- Compiler
- ISA
- (10 points) Assume that a program requires 1 x 106 compute, 5 x 105 load/store, and 5 x 10 5 branch operations. Assuming a compute takes 1 cycle, load/store 10 cycles, and a branch 3 cycles on a 3GHz processor.
- Compute the CPI for this program on this machine.
- Compute the time required for this program to run on this machine.
- (5 points) Using the computer described in the previous question. Assume performance is defined in terms of the fastest program which can be run on this computer.
- Describe this program.
- What is the CPI for this program?
- (10 points) Describe three functions performed by an assembler.
- (10 points) A company produces 1000 different types of items. Each item comes in 4 sizes and can be one of 29 different colors. Design an efficient system for providing a model number which includes the item type, size and color. Explain your system.
- Where is this system efficient?
- How is it inefficient?
- How much product/feature growth can the company sustain with your encoding system?
- (5 points) Give three disadvantages of programming in assembly language.
- (5 points) Describe the difference between general purpose and special purpose registers. Give an example of each in the MIPS ISA.
- (5 points) Explain the Memory Allocation figure on the back of the "Green Sheet". What is stored in each region?
- (5 points) What are the MPIS pseudoinstructions? Why are they provided? What "implements" these instructions and how?
- (5 points) What is the purpose of the $zero register int he MPIS instruction set? Give a non-trivial example of the use of this register.
- (5 points) A princess was born 1.26x106 Antarian Periods ago.
- There are 2 Omicron-Persei-8 years in an Anterian year.
- There are 900 Antarian Periods in an Anterian month and 4 Antarian months in an Antarian year.
- There are 3 Earth year in a single Coruscant Solar Cycle.
- There are 100 Omicron-Persei-8 years in a Coruscant Solar Cycle.
How old is the princess on earth? Show your computation in a manner can be verified by others.