CSE 120 (Fall 2004) -- Homework #1

Out: 9/28
In: 10/5

  1. Chapter 1: 11

    1.11  Consider the various definitions of operating system. Consider whether the operating sytem should include applications such as web browsers and mail programs. Argue both pro and con positions, and support your answers.

  2. Chapter 2: 3, 5, 6, 8


    2.5  Which of the following instructions should be priviledged?
    a. Set value of timer
    b. Read the Clock
    c. Clear Memory
    d. Turn off interrupts
    e. Switch from user to monitor mode

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

    2.8  Protecting the operating system is crucial to ensureing that the computer system opeartes 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 minimla constraints on the use.
    The following is a list of instructions that are normally protected. What is the minimal set of instructions 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

  3. Chapter 3: 9

    3.9  Why does Java provide the ability to call from a Java program native methods that are written in, say, C or C++? Provide an example where a native method is useful.

  4. 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?

  5. [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?

  6. [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)?

  7. [Deitel] Using your Unix machine logged in with a normal user account instead of root is an example of the principle of least privilege. Relate this principle to the concepts of user mode, kernel mode, and privileged instructions.