PART
IV CASE STUDIES
Chapter
24 Classical UNIX
Objectives
To understand the structure and behaviour
of the UNIX kernel. To criticise the basic design and
to study how more recent UNIX systems have met these criticisms.
Points to emphasise
- UNIX is about thirty years
old; although the foundations remain the same, a lot of what we see in
current UNIX-derived systems was not present in the original design.
- There are good and bad
aspects of the basic UNIX design.
Chapter 25 shows how UNIX has been adapted for multi-processor
machines and for networked computers.
- IPC was probably the worst
aspect of the original design. System V has rewritten IPC. It offers
shared memory with semaphores and local message passing. BSD developed
networking which subsumes pipes.
- UNIX is executed procedurally
(in-process).
- The UNIX process model is
heavyweight (one process per address space).
- System calls are synchronous
and potentially blocking.
- It is difficult to build
systems above classical UNIX. We can’t have the multithreading we need.
This is bad for both system services (e.g. communications packages such as
RPC, see Chapter 13) and higher level applications.
- The UNIX interface has become
a de-facto standard. More recent systems are constrained to support the
UNIX interface so that existing software will still run on them.
Possible difficulties
The material should be easy to understand since we
have often used UNIX as an example.
Procedural execution of the UNIX kernel can make
some of the detail difficult to understand. How does bottom-up I/O handling get
done? What happens when a process goes to sleep?
Teaching hints
- Avoid a flat description.
Take a critical approach. UNIX is so successful it can take it! Why is it
so successful? Are other commercial systems even worse?
- If the students can use UNIX
systems set up practical work to illustrate command composition, dynamic
process creation, pipelines of processes and so on.