Review of Lions' Commentary

By Jaap Akkerhuis <>

Matrix News

April 1997

At the beginning of 1978 I received from my boss, Teus Hagen, two books, each about 200 pages long. These were ``UNIX Operating System Source Code Level Six'' and ``A Commentary on the UNIX Operating System''. Copying of these was strongly discouraged and also the books were not supposed to leave the building ever.

For years these booklets were the best and best known introduction to UNIX without ever being published. The source code was licensed by Western Electric Company and proprietary of Bell Telphone Laboratories. The commentary was so tied to the source code that separate publication would have been pointless. Despite the non-publication, its popularity was demonstrated when John Lions attended for the first time a European Unix User Group conference (Cambridge 1984). After his talk long queues formed of people which wanted an autograph on their n-th generation illegal copy.

In honour of the 25th birthday of UNIX, an attempt was made to publish it officially, but, on the moment the lawyers finally gave permission, the rights went to X/Open and the juridical battle had to start from scratch. After SCO acquired the rights the process speeded up because SCO's Chief Information Oficer quickly could convince the juridical staff that no strategic interests would be hurt by the publication.

Both booklets are now bundled in Lions' Commentary on UNIX 6th Edition with source code and augmented with background information, publication history, introductions by Dennis Ritchie and Ken Thompson and commentaries by other UNIX gurus.

The source code is a lightly edited version of the original source. This allowed better separations into various self contained sections, such as system initialization, and process management, interrupts and system calls, Input/Output, files and file systems, and character devices. To help the reader there are also alphabetical lists of definitions of procedures, symbols etc. and a cross reference. The system is complete and is able to run on a PDP11/40 with a RK05 disk drive, LP11 line printer interface, PCL11 Paper Tape reader/writer and a KL11 terminal interface. (Re-)reading this code is a pleasure thanks to the lay-out conventions it used, especially if you compare this to code which is produced nowadays.

The Commentary consists of two parts. The first part starts with a treatment of other documentation the reader might need, such as the UNIX programmer's manuals, DEC hardware manuals etc. This is followed by a section about the architecture of the PDP11. One chapter is devoted to the art of reading C-programs. In only a few pages the essence of the language is explained in a superior way. After some examples, the real source is discussed in the second Part. This is again divided into the same sections as mentioned above. Each sections starts with a global overview, after which follows a detailed commentary on the code. As John Lions himself already explains, this commentary is a supplement to the comments in the source. It is possible to understand the code without the extra commentary and the reader is advised to do so and only read the notes when getting desperate. In the commentary are remarks how the code might be written better and otherwise improved. When I read the books for the first time, it was a revelation to me. Not hindered by any formal education in computer sciences, operating systems were always daunting to me. Something for which one needed to have long specialized training. After reading these documents, this notion was replaced with the knowledge that it was just a big program and by admiration for the elegance of the UNIX operating system.

Currently there are more books on the marketplace describing the UNIX kernel but there is hardly any such book as detailed as this one. Just like as is said about Algol 60, this book is in many respects an improvement over all of its successors. Admittedly, UNIX version 6 is outdated and the hardware hardly available, but because of the compactness compared to the current systems, it is still a good introduction for people who want to know the essentials of UNIX. And of course, everyone in the possession of (a copy of) an illegal version should feel obliged to get this book.

Lions' Commentary on UNIX 6th Edition with source code by John Lions, Peer-to-Peer Communications, ISBN 1-57398-013-7.

Copyright 1997 by the author.