From: Jeff Duzak (jduzak_at_exchange.microsoft.com)
Date: Wed Jan 07 2004 - 15:10:11 PST
In this paper, Ritchie and Thompson describe various features of the UNIX operating system, including the file system, processes, the shell, and traps (or exception handling). The paper also describes the implementation of some of these features, especially the file system.
The majority of this paper reads like a user's manual or a programmer's tutorial. The descriptions of the use of the file system, the file creation / read / write commands, the use of pipes, etc, are very familiar from other operating systems such as DOS and Windows.
The striking characteristic of this system is its elegance. The way that features are designed is such that new features are created simply as a corrolary. For example, the fact that console I/O is encapsulated to appear the same as reading from or writing to a file makes it trivially easy for the shell to implement the "<" and ">" operators, which re-direct I/O to or from a file as opposed to always having input read from the keyboard and output written to the screen (or line printer). Combine this with the fact that the shell is itself simply a program which the user can execute, and you get for free the capability to script.
I'm a little surprised with the statement that "The most important role of UNIX is to provide a file system." Perhaps I take the file system for granted, but I'm more impressed with the multitasking capability of the system. The multitasking system is described somewhat in the description of the spawning of new processes, but no mention is made anywhere of the scheduling mechanism used in the system.
The implementation of directories in UNIX was also a surprise, and perhaps an indication that too much elegance may have its drawbacks. It is very interesting to think of a directory as being simply a table which correlates a name with a file identifier. If this is the case, then the directory structure can be much more general than the traditional top-down hierarchy. It can be a graph, with each directory being a node, and the entries in the directory being the links between the nodes. However, for various implementation reasons, the creators had to require that the directories be structured as a heirarchy. Further, they had to impose some restrictions on the use of file linking as well, such as forbidding a file entry in a directory from referring to a file on a device other than the device on which the directory itself resides. In this case, it seems as though the architects of the system try to use a design that is too elegant to be implemented on the underlying hardware, and this leads to some inconsistencies.
Lastly, the reliability statistics are interesting and somewhat encouraging. The UNIX system seems to be designed to reduce complexity as much as possible, and one would expect that it would therefore be a very reliable system. Yet, the total up-time for the system is 98%, with a crash occurring roughly every other day. I don't have statistics on modern systems, but it seems that we do somewhat better than that today.
This archive was generated by hypermail 2.1.6 : Wed Jan 07 2004 - 15:10:12 PST