CS 110 Homework Assignment 1
Due: Friday, February 8, 2002, at 9PM
Turn in your assignments in the bin outside Geoff's office.
Late homework will be penalized; see the
late policy for more information.
We also will not accept handwritten material or printouts in which
long lines are wrapped in the middle of a word.
We prefer that you use a text processor. You might try troff
or latex/xfig.
Also remember to date and time stamp your homework.
-
3 points:
MOS 1.4, p. 67. On early computers, every byte of data read
or written was directly handled by the CPU (i.e., there was no
DMA). What implications does this organization have for
multiprogramming?
-
2 points:
How does the distinction between kernel mode
and user mode function as a rudimentary form
of protection (security) system?
-
2 points:
MOS #1.8, p. 68,
Which of the following instructions should be allowed only
in kernel mode?
-
Disable all interrupts.
-
Read the time-of-day clock.
-
Set the time-of-day clock.
-
Change the memory map.
-
2 points:
MOS #1.10, p. 69.
A computer has a pipeline with four stages. Each stage takes the same
time to do its work, namely, 1nsec. How many instructions per second
can this machine execute?
-
2 points:
MOS 1.14, p. 68.
What is the key difference between a trap
and an interrupt?
-
2 points:
MOS #1.16, p. 70.
Why is the process table needed in a timesharing system?
Is it also needed in personal computer systems in which
only one process exists, that process taking over the
entire machine until it is finished?
-
2 points:
MOS #1.19, p. 70.
Can the
count = write(fg, buffer, nbytes);
call return any value in count
other than nbytes
?
If so, why?
-
2 points:
Explain the difference between busy waiting and blocking.
Last modified January 22, 2002 by geoff@cs.hmc.edu