CSCI 4320 (Principles of Operating Systems), Fall 2003:
Homework 1

Assigned:
September 8, 2003.

Due:
September 16, 2003, at 5pm.

Credit:
20 points.

Reading

Be sure you have read chapter 1.


Problems

Answer the following questions. You may write out your answers by hand or using a word processor or other program, but please submit hard copy, either in class or in my mailbox in the department office.

  1. (5 points) Writing an operating system that can operate without interference from faulty or malicious application programs is difficult if not impossible without certain hardware features. Name three such features and briefly explain how each contributes to the goal (of writing an operating system that can defend itself, so to speak).

  2. (5 points) For each of the following instructions, say whether it should be executed only in kernel (i.e., supervisor) mode and briefly explain why.

    1. Set the time-of-day clock.

    2. Disable all interrupts.

    3. Read the time-of-day clock.

    4. Change the base and limit registers (assuming the memory-management scheme described on pp. 26-27).

    5. Switch from user mode to supervisor mode.

  3. (5 points) Consider the following categories of operating system services.
    1. Program loading and execution (loading programs into memory, starting them up, and taking appropriate action when they terminate).
    2. I/O operations (communicating with I/O devices and controllers).
    3. Filesystem manipulation (creating files and directories, reading from and writing to files, etc.)
    4. Communication among processes (e.g., between a word-processing application and a background process controlling a printer).
    5. Error detection and handling (detecting hardware and other errors and taking appropriate action).
    6. Allocation of resources (CPU, memory, etc.)
    7. Accounting (recording each user or program's use of resources, for billing or performance-analysis purposes).
    8. Protection (protecting applications from each other, protecting the operating system from applications, etc.)
    Why is it desirable, or even necessary, to have these services provided by an operating system rather than delegating them to individual application programs? (Your answer can address each category separately, or you may group them if similar reasons apply to several categories.)

  4. (5 points) We've talked about the benefits of having an operating system. Can you think of circumstances in which it would be advantageous not to have one? If so, what?



Berna Massingill
2003-09-08