George Mason University
DEPARTMENT OF COMPUTER SCIENCE

CS571 Operating Systems Fall 2001

Assignment A3 (10 points)

Due 9/18/01




Before doing these problems, read Chapter 13 from Operating System Concepts (or chapters on I/O systems from equivalent books). Also read the slides concerning Handles and Directories, Information Objects, and Virtual Machines from the slide section of the web site. Read the set of notes about virtual machines. Also read the corresponding sections of the CS encyclopedia article. Discuss all parts of this problem with your study partners. Write your own individual report. Acknowledge all sources.

NOTE: Prepare your report with a word processor using a 2" wide right margin to allow for grading.

ALSO NOTE: Explain or justify your answers. A simple "yes" or "no" does not reveal whether you understand or whether you merely guessed right.


(1) Why are directories a separate level of the layer-hierachy, rather than part of the file system?

(2) Someone types this command line to Unix:

     outfile < cat | sort -a | sort -d > infile
where -a is a sort option for "ascending order" and -d for "descending order." Is this command valid syntactically? Diagram the structure of virtual machines that Unix would create to execute this command line.

(3) Why is an open file handle different from a file handle?

(4) Where are a user's handles stored? What assurances are there that handles are not changed once the system creates them? What can go wrong if handles are changed?

(5) Microsoft's DOS has a pipe syntax similar to UNIX. DOS implements a command "A | B" by running program A and capturing all its output into a temp file; then running program B with that temp file as its input. How does this differ from the execution model of UNIX (as given by the virtual machines model)? Why is UNIX a more powerful implementation?