| CS 354, version A Fall 2004 | Name:___________________ ID:___________________ Login:_____________________ | |
| Exam 4 | ||
|
No electronic devices may be used while taking this exam. Examples of devices not allowed are calculators, pagers, cell phones, wrist calculators/computers, laptop computers, pocket computers. Each student is allowed one 8.5 by 11 inch sheet of paper with handwritten notes. The notes may be on both sides of the paper. Show all work, and do any/all calculations on the exam. Extra scratch paper may not be used. |
Exam Score Q1 = _____ / 9 Q2 = _____ / 6 Q3 = _____ / 5 Q4 = _____ / 5 Q5 = _____ / 6 Q6 = _____ / 19 Q7 = _____ / 9 Q8 = _____ / 6 Total = _____ / 65 |
Question 1 (9 points, 3 points each part)
Karen worked on a computer system that incorrectly set
the priority levels of disk interrupts as compared
to clock interrupts.
PART A
Which device (disk or clock) should have had the highest (best)
priority level for correct operation?
PART B
Suppose that Karen is to be paid at an hourly rate according
to the time provided by this incorrectly functioning
computer system.
Is Karen happy about this?
Briefly justify your answer.
PART C
Suppose that this system's clock started saying it was 8:00am,
and finished saying that it was 11:40am,
when 4 hours went by according to the wall clock.
If the system clock sends interrupts at the rate of 1 per millisecond,
how many clock interrupts were lost?
Question 2 (6 points total, 3 points each part)
PART A
Write a MAL code fragment that a kernel could
use to enable interrupts (and not change anything else).
PART B
If a kernel executed the code fragment written for PART A,
would the kernel then be reentrant or nonreentrant?
Question 3 (5 points)
As a computer designer of a memory system with a single cache,
you run a program that generates four million memory requests.
Of these requests, 100,000 of them miss in the cache.
Being a careful designer, you check your work by running a
different program that generates six million memory requests.
Of these requests, 300,000 of them miss in the cache.
Are these statistics possible? Briefly justify your answer.
Question 4 (6 points total)
Fill in a single word to complete each of the following sentences:
Pipelining is great.
It increases processor performance
by increasing the __________________ with respect to
the number of instruction completions.
Instruction __________________ is the total amount of time
that an instruction takes to execute from start to finish.
Question 5 (5 points total)
A programmer is working on a program, in order to make the
program run faster.
The programmer tells you that a speedup of 10
has been obtained.
Explain what happened in terms of the number of
instructions executed when this improved
program is run.
Question 6 (19 points total)
PART A (4 points)
Give a 3-instruction TAL code fragment that contains a data dependency
between the first and second instructions within the fragment.
The dependency must be one that
would cause a stall in the MIPS R2000 5-stage pipeline.
The third instruction in the code fragment must not be dependent on the
first two instructions.
PART B (10 points)
Identify each of the stages of the MIPS R2000 5-stage pipeline
by giving its 2-letter abbreviation, and very briefly describe what each stage does.
Question 7 (9 points total, 3 points each part)
When computing an IEEE single precision floating point addition,
the mantissa that represents the sum is calcuated to be
g r s
1.01000001000000000000010 1 0 0
Question 8 (6 points total)
Write a MAL code fragment that spin waits for the value
in the integer variable X3
to become greater than the value 18.
The code must place the value 18 into register $10.
After dropping out of the spin wait loop, the code fragment
sets the value of variable X3 to be 0.