This repository reconstructs the instructional environment assumed by John Lions’ A Commentary on the UNIX Operating System. It brings together a running Sixth Edition UNIX system, the corresponding source code and commentary, DEC hardware documentation, OpenSIMH documentation, installation media, reproducible checkpoints, and an active working laboratory.
The collection is organized by system layer so that Lions’ commentary can be read alongside the source code, the underlying PDP-11 architecture, the relevant peripheral manuals, and the executing system.
The material is intentionally exploratory. Notes may be incomplete, mistaken, or superseded as the experiments develop.
Core UNIX and Lions materials:
- UNIX Operating System Source Code Level Six
- A Commentary on the UNIX Operating System
- Setting Up UNIX—Sixth Edition
- Setting Up UNIX—Sixth Edition: An OpenSIMH Laboratory for Reading Lions
These documents describe the V6 source, its installation, and the environment in which Lions’ commentary is situated.
Documentation for the PDP-11/40 and its architectural environment:
- PDP-11/40 processor
- KT11-D memory management
- UNIBUS
- PDP-11 peripherals
These manuals explain the processor instructions, addressing modes, traps, memory mapping, bus structure, and machine registers used by the V6 kernel.
Documentation for the devices configured in the laboratory kernel:
- KL11 console terminal
- DL11 asynchronous serial interface
- KW11-L line clock
- RK11-D controller and RK05 disks
- TM11 controller and TU10 tape drive
- PC11/PR11 paper-tape reader and punch
- LP11 line printer
These manuals correspond closely to the V6 device drivers in /usr/sys/dmr and to the interrupt vectors generated in /usr/sys/conf/l.s.
OpenSIMH documentation for the simulated PDP-11 environment.
OpenSIMH supplies the processor, memory, controllers, drives, terminal interfaces, and peripheral devices presented to V6.
Original and prepared V6 distribution media:
v6.tape— the original raw V6 distribution tape imagev6enb.tar.gz— tape blocking and conversion material
These files provide the source media from which the laboratory can be reconstructed.
Utilities and simulator configuration files used to construct or operate the laboratory:
enblock— converts raw tape records to OpenSIMH tape formatdeblock— reverses the conversiontboot.ini— OpenSIMH configuration for bootstrapping from the distribution tape
Restorable checkpoints from significant stages of the laboratory:
- baseline V6 installation
- V6 with
/dev/zero - V6 with
/dev/zeroand a working autoboot block SHASUMchecksums for verification
These archives provide known states to which experiments can be returned without repeating the complete installation process.
The checkpoint archives should be preserved unchanged.
The active local laboratory workspace:
- OpenSIMH configuration files
- RK05 disk images
- simulated paper-tape and printer files
- experimental bootstrap programs
- unpacked working checkpoints
The disk images and other files in this directory are working media and may be modified freely. The directory is excluded from version control.
Reading notes, experiments, source annotations, bootstrap investigations, hardware-register references, and observations made while working through Lions.
Current topics include:
- the RK05 first-stage bootstrap
- the V6 filesystem boot program
- autoboot experiments
- the
/dev/zerokernel modification - reconstructed boot-loader source
A useful note may connect four levels:
Lions commentary
↓
V6 source
↓
DEC hardware manual
↓
running OpenSIMH system
Notes tied to particular pages or passages in the Lions commentary.
These files record detailed readings of the commentary alongside the corresponding source and executing system.
The reconstructed system is a PDP-11/40 with:
- KT11-D memory management
- four RK05 disk drives on an RK11 controller
- one TU10 tape drive on a TM11 controller
- a KL11 console terminal
- a KW11-L line clock
- a PC11 paper-tape reader and punch
- an LP11 line printer
The V6 kernel is rebuilt for this configuration.
From the work directory:
pdp11 boot.iniAt the UNIX disk-bootstrap prompt:
@unix
Log in as root:
login: root
The distributed root account has no password.
For responsive terminal output:
stty cr0 nl0Experiments may alter the kernel, boot block, source tree, or filesystems. Extract the desired archive from known-good/ into the working directory.
For example:
cd work
tar xvzf ../known-good/baseline-v6.tar.gz
cd baseline-v6
pdp11 boot.iniOther checkpoints may be restored in the same way.
When studying a kernel routine:
- Read the relevant section in Lions.
- Locate the corresponding file under
/usr/sys. - Consult the appropriate DEC manual for instructions, registers, vectors, and device behavior.
- Observe or modify the running system.
- Record the result under
notes/. - Restore a known-good checkpoint when necessary.
For example:
Lions Chapter 6
→ /usr/sys/ken/main.c
→ PDP-11/40 and KT11-D manuals
→ rebuild /unix
→ boot and observe
Device-driver study follows the same pattern:
| V6 source | Hardware documentation |
|---|---|
m40.s |
PDP-11/40 Processor Handbook; KT11-D manual |
clock.c |
KW11-L manual |
kl.c |
KL11 and DL11 manuals |
rk.c |
RK11-D/RK05 manual |
tm.c |
TM11/TU10 manual |
pc.c |
PC11/PR11 manual |
lp.c |
LP11 manual |
l.s |
Processor and device interrupt-vector documentation |
This is not merely an archive of historical documents. It is a working laboratory for understanding V6 as an implemented system.
The objective is to make the entire path inspectable:
front-panel or simulator bootstrap
↓
tape or disk boot program
↓
UNIX kernel
↓
initialization
↓
processes, filesystems, and devices
↓
user shell
Nothing in the laboratory is irreplaceable. The system is intended to be read, changed, rebuilt, broken, and restored.
Good hunting.