CSCI 4320 (Principles of Operating Systems), Fall 2003:
Homework 1
- Assigned:
- September 8, 2003.
- Due:
- September 16, 2003, at 5pm.
- Credit:
- 20 points.
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.
- (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).
- (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.
- Set the time-of-day clock.
- Disable all interrupts.
- Read the time-of-day clock.
- Change the base and limit registers (assuming the
memory-management scheme described on pp. 26-27).
- Switch from user mode to supervisor mode.
- (5 points)
Consider the following categories of operating system services.
- Program loading and execution (loading programs
into memory, starting them up, and taking
appropriate action when they terminate).
- I/O operations (communicating with I/O devices
and controllers).
- Filesystem manipulation (creating files and
directories, reading from and writing to files,
etc.)
- Communication among processes (e.g., between
a word-processing application and a background
process controlling a printer).
- Error detection and handling (detecting hardware
and other errors and taking appropriate action).
- Allocation of resources (CPU, memory, etc.)
- Accounting (recording each user or program's use
of resources, for billing or performance-analysis
purposes).
- 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.)
- (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