The Structure of the THE Multiprogramming System
Dijkstra (1967)
What kind of paper is this?
- Describes a system.
- Describes use of semaphores in an OS (not the introduction of semaphore;
this happened in an earlier Dutch paper circa 1963).
- First attempt at proving a system correct.
- Context: contemporary of OS/360
Some of my favorite quotes:
- an interrupt system to fall in love with is certainly an inspiring feature
- experience does by no means automatically lead to wisdom
- the intellectual level needed
for system design is in general grossly underestimated
- Qualitatively speak- ing, I am afraid, we became more and more immodest as the work progressed.
- the resulting system is guaranteed to be flawless
Designed for the WL XS machine
- 32 K words (27 bits) of 2.5 microsecond memory.
- 512 K word drum
(1024 words per track; 25 RPM) [this is the persistent memory -- this disk!].
- Indirect addressing.
- Large number of low capacity channels.
System Goal
- Decrease turn-around time for short jobs.
- Use Peripherals economically.
- Automatic control of backing store.
- OK to use the machine for jobs that aren't compute intensive.
Testing
- Provably correct.
- Exhaustively tested.
- "Guaranteed to be flawless."
Storage Allocation
- Write anywhere paging.
- Allocation becomes trivial.
Software Structure
- Implemented as a set of sequential processes (we take this for
granted in many ways today).
- Process abstracts out timing information.
- Example
- One process per user program.
- One process per peripheral device.
- Use semaphores to synchronize across processes, thereby
guaranteeing that there are no misunderstood interactions. What is
the problem with this strategy?
- Strict hierarchical structure
- Level 0: Process scheduling.
- real time clock to generate interrupt.
- priorities to provide quick turn around.
- abstraction: each process has its own machine.
- Level 1: Segment controller.
- essentially the pager.
- does bookkeeping.
- abstraction: programs refer to segments, independent of their location.
- Level 2: Message interpreter.
- manages keyboard.
- keyboard and printing two separate devices.
- abstraction: each process has its own console.
- Level 3: I/O streams.
- multiplexes peripherals among processes buffering input.
- unbuffering output.
- abstraction: peripherals are logical communication units.
- Level 4: User programs.
- Level 5: The operator.
Can any system be made hierarchical?
- Examples: memory management versus file system.
- MM manages memory but must use the FS to move pages to/from disk.
- FS uses MM for buffering.
- Eliminating such circularities will make system easier to build and
maintain.
Tips for doing research
- Never underestimate the time to debug!
- Select advanced project (keep mundane work to a minimum).
- Select a machine with a sane architecture.
- Beware that experience does not equate to wisdom.