CS 110 Homework Assignment 3
Due: Saturday 3 March, 9PM
-
Points 3,
S&G, 2.5, pg 46
-
Points 3,
S&G, 2.7, pg 46
-
2-1 from Paul with the following changes:
write only a version
with all appropriate
nops
-
2-3 from Paul with the following changes:
write only a version
with all appropriate
nops
-
Assume that you are the OS architect and must implement
semaphores on a SPARC.
Write the
enter_region &
exit_region
instructions in SPARC assembly.
(don't run them, just code them)
For further clarification, look back at the slide
handed out concerning, TSL. Basically, rewrite that
code in Sparc assembly language.
Obviously the variable 'Lock' is some part of the
OS that is easily found by these routines.
Notes:
-
Write the SPARC assembly language
programs in assembly language,
assemble them with gcc, and test them with gdb. For
these, all data can be kept in registers; you do not have to use memory
loads and stores.
-
Turn in printed copies of your programs and short
transcripts (script) of the gdb sessions.
In particular, show at least the final output and
the steps through 2-3.
Setting additional breakpoints and print outs is ok,
but not necessary.
-
Look at the qref page for ways
to save on printer paper.
Where to Turn in:
The plastic bins outside Mike's office, 249 Olin.
Last modified February 15, 01 by mike@cs.hmc.edu