CSE 120: Homework #1

Spring 2009

Out: 4/2
In: 4/9

  1. List two challenges an OS faces when passing parameters between user and kernel mode. Describe how an OS can overcome them.

  2. [Silberschatz] Some computer systems do not provide a privileged mode of operation in hardware. Is it possible to construct a secure operating system for these computers? Give arguments both that it is and that it is not possible.

  3. [Silberschatz] What are the differences between a trap and an interrupt? What is the use of each function?

  4. [Silberschatz] Which of the following instructions should be privileged?

    a) Set value of timer
    b) Read the clock
    c) Clear memory
    d) Turn off interrupts
    e) Switch from user to monitor mode

  5. [Silberschatz] Protecting the operating system is crucial to ensuring that the computer system operates correctly. Provision of this protection is the reason for dual mode opeartion, memory protection, and the timer. To allow maximum flexibility, however, you should also place minimal constraints on the use.

    The following is a list of instructions that are normally protected. What is the minimal set of instructions from this list that must be protected?

    a) Change to user mode
    b) Change to monitor mode
    c) Read from monitor memory
    d) Write into monitor memory
    e) Fetch an instruction from monitor memory
    f) Turn on timer interrupt
    g) Turn off timer interrupt

  6. [Tanenbaum] For each of the following system calls, give a condition that causes it to fail: open, fork, exec, unlink.

  7. The Java runtime provides a set of standard system libraries for use by programs. To what extent are these libraries similar to the system calls of an operating system, and to what extent are they different?

  8. [Crowley] Suppose the hardware interval timer only counts down to zero before signalling an interupt. How could an OS use the interval timer to keep track of the time of day?

  9. [Tanenbaum] One reason GUIs were initially slow to be adopted was the cost of the hardware needed to support them. How much video RAM, in bytes, is needed to support a 25 line X 80 row character monochrome text screen? How much for a 1024 X 768 24-bit color bitmap? What was the cost of this RAM at 1980 prices ($5/KB)? How much is it now (say, $0.25/MB)?



voelker@cs.ucsd.edu,