| CS 354, version A
Fall 2007 | Name:___________________ ID:___________________ | |
| Exam 3 | ||
|
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 EC = _____ / 4 Q1 = _____ / 8 Q2 = _____ / 6 Q3 = _____ / 6 Q4 = _____ / 20 Q5 = _____ / 10 Q6 = _____ / 10 Total = _____ / 70 |
Extra Credit Question (4 points)
Without explicitly setting it, which IEEE rounding method is a program
likely to utilize?
And, (very briefly) why that particular rounding method?
Question 1 (8 points total, with 4 points for each part)
A fragment of TAL assembly language code is given by:
while: bgtz $9, end_while
add $8, $9, $10
add $9, $10, $11
add $10, $11, $12
beq $0, $0, while # an unconditional branch
end_while:
Part A
Give the decimal value represented by the offset (immediate) field
of the machine code for the bgtz instruction.
beq instruction.
Question 2 (6 points)
Write a TAL assembly language synthesis
(not machine code) for following MIPS assembly language
instruction.
The value that goes into register $2 ($v0) for putc is 11.
putc $8
Question 3 (6 points total, with 3 points for each part)
PART A
Is the kernel we used and modified for Assignment 6 intended to
be reentrant or nonreentrant?
PART B
Would the kernel portion of a commercially available operating system
be reentrant or nonreentrant?
Question 4 (20 points total, with 4 points for each step)
List the 5 hardware steps that must be accomplished between
instructions just before an interrupt is taken and handled.
One of these 5 must occur after the other 4; list that
one as number 5.
Give enough information to demonstrate your complete knowledge
of which bits change to what values, and where the bits are.
Please do not explain why the bits change.
Question 5 (10 points total, with 5 points for each part)
Simulations of computer system performance are done on two
proposed processor designs, each with an L1 cache.
One is called system A, and the other is called system B.
On system A, simulation of the benchmark program causes 200,000 cache misses
out of a total of the 5,000,000 memory accesses.
On system B, the simulation causes 80,000 cache misses
out of a total of the 5,000,000 memory accesses.
Part A
Are these cache statistics possible, or is the simulation of the
benchmark program producing impossible results?
Very briefly, justify your answer.
Part B
Presume that the given statistics are possible.
As chief architect, which computer system (A or B) do you
choose? Justify your choice with the statistics.
Question 6 (10 points total, with 5 points for each part)
An assembly language application contains
12,000 assembly language instructions.
It is run to benchmark its execution time.
It takes 12 seconds to run.
The application's programmer then works on the assembly language code
to make it better.
After this, the application takes 10 seconds to run.
Part A
What is the speedup?
Part B
If all instructions take the same amount of time to execute,
how many assembly language instructions were removed from this
application?