ArticleslgStudy

computer science

A Commentary on the UNIX Operating System

A Commentary on the UNIX Operating System is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand A Commentary on the UNIX Operating System rather than just read about it. In short: A Commentary on the Sixth Edition UNIX Operating System by John Lions (later reissued as Lions' Commentary on UNIX 6th Edition and commonly referred to as the Lions Book) is a highly influential 1976 publication containing analytical commentary on the source code of the 6th Edition Unix computer operating system "resident nucleus" (i.e., kernel) software, plus copy formatted and indexed by Lions, of said source code…

A Commentary on the UNIX Operating System — main illustration
A Commentary on the UNIX Operating System — illustration

Key takeaways

  • A Commentary on the UNIX Operating System belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect A Commentary on the UNIX Operating System to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of A Commentary on the UNIX Operating System from memory before moving on to harder problems.

Reference excerpt

A Commentary on the Sixth Edition UNIX Operating System by John Lions (later reissued as Lions' Commentary on UNIX 6th Edition and commonly referred to as the Lions Book) is a highly influential 1976 publication containing analytical commentary on the source code of the 6th Edition Unix computer operating system "resident nucleus" (i.e., kernel) software, plus copy formatted and indexed by Lions, of said source code obtained from the authors at AT&T Bell Labs. Itself an exemplar of the early success of UNIX as portable code for a publishing platform, Lions's work was typeset using UNIX tools, on systems running code ported at the University, similar to that which it documented. It is suspected to be the most frequently photocopied book in computer science. Despite its age, Lions's book is still considered an excellent commentary on simple, high quality code. Lions's work was most recently reprinted in 1996 by Peer-To-Peer Communications, and has been circulated, recreated or reconstructed variously in a number of media by other parties.

History

The source code and commentary were printed in book form in 1977, after first being assembled in May 1976, as a set of lecture notes for Lions's computer science courses (6.602B and 6.657G, mentioned in the introduction of the book) at the University of New South Wales. UNSW had obtained UNIX source code in 1975, in response to Ken Robinson's 1974 query to Dennis Ritchie at Bell. Bell Labs was a subsidiary of AT&T, due to the 1956 Consent Decree AT&T was not permitted to conduct business in any other field hence couldn't sell the software, though it was required, paradoxically, to license its inventions, such as Unix and the transistor. Western Electric, another AT&T subsidiary, administered the licensing. From 1977, with the v7 & later licenses, AT&T forbade code commentaries for teaching and allowed only one copy of the Lions Commentary, printed, per license. The UNIX User's group, USENIX's newsletter, UNIX News, of March 1977, announced the availability of the book to UNIX licensees. Difficulty in keeping pace with the book's popularity, meant that by 1978 it was available only from AT&T Bell Labs. When AT&T announced UNIX Version 7 at USENIX in June 1979, the academic/research license no longer automatically permitted classroom use. However, thousands of computer science students around the world spread photocopies. As they were not being taught it in class, they would sometimes meet after hours to discuss the book. Many pioneers of UNIX and open source had a treasured multiple-generation photocopy. Other follow-on effects of the license change included Andrew S. Tanenbaum creating Minix. As Tanenbaum wrote in Operating Systems (1987):

When AT&T released Version 7, it began to realize that UNIX was a valuable commercial product, so it issued Version 7 with a license that prohibited the source code from being studied in courses, in order to avoid endangering its status as a trade secret. Many universities complied by simply dropping the study of UNIX, and teaching only theory. Various UNIX people, particularly Peter H. Salus, Dennis Ritchie and Berny Goodheart, lobbied Unix's various owners (AT&T, Novell, the Santa Cruz Operation) for many years to allow the book to be published officially. In 1996, the Santa Cruz Operation finally authorised the release of the twenty-year-old 6th Edition source code (along with the source code of other versions of "Ancient UNIX"), and the full code plus the 1977 version of the commentary was published by Peer-To-Peer Communications (ISBN 978-1-57398-013-5). The reissue includes commentary from Michael Tilson (SCO), Peter Salus, Dennis Ritchie, Ken Thompson, Peter Collinson, Greg Rose, Mike O'Dell, Berny Goodheart and Peter Reintjes.

Contents

UNIX Operating System Source Code Level Six is the kernel source code, lightly edited by Lions to better separate the functionality — system initialization and process management, interrupts and system calls, basic I/O, file systems and pipes and character devices. All procedures and symbols are listed alphabetically with a cross reference.

The code as presented will run on a PDP-11/40 with RK05 disk drive, LP11 line printer interface, PCL11 paper tape writer and KL11 terminal interface, or a suitable PDP-11 emulator, such as SIMH. A Commentary on the UNIX Operating System starts with notes on UNIX and other useful documentation (the UNIX manual pages, DEC hardware manuals and so on), a section on the architecture of the PDP-11 and a chapter on how to read C programs. The source commentary follows, divided into the same sections as the code. The book ends with suggested exercises for the student. As Lions explains, this commentary supplements 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 as needed. The commentary also remarks on how the code might be improved.

"You are not expected to understand this" The infamous program comment "You are not expected to understand this" occurs on line 2238 of the source code (Lions' Commentary, p. 22) at the end of a comment explaining the process exchange mechanism. It refers to line 325 of the file slp.c. The source code reads:

A major reason why this piece of code was hard to understand was that it depended on a quirk of the way the C compiler for the PDP-11 saved registers in procedure calls. This code failed when ported to other machines and had to be redesigned in Version 7 UNIX. Dennis Ritchie later explained the meaning of this remark:

"You are not expected to understand this" was intended as a remark in the spirit of "This won't be on the exam", rather than as an impudent challenge.

See also xv6 – Modern reimplementation of Sixth Edition Unix

References

Further reading Andrew S. Tanenbaum, Operating Systems: Design and Implementation, (Prentice Hall, ISBN 0-13-637331-3, June 1987) Brian W. Kernighan and Dennis Ritchie, The C Programming Language, ISBN 0-13-110362-8

External links MIT's "6.828: Operating System Engineering" Fall 2006 ACM's Digital Library entry for the book Code Critic Archived 2011-10-31 at the Wayback Machine(Rachel Chalmers, Salon, 30 November 1999) The Daemon, The GNU and the Penguin - Ch. 6: 1979 (Peter H. Salus)

Illustrations

A Commentary on the UNIX Operating System illustration
A Commentary on the UNIX Operating System: John Lions with his students in 1980
John Lions with his students in 1980
A Commentary on the UNIX Operating System: A Japanese reprinting of A Commentary on the UNIX Operating System, and accompanying formatted source code, with accompanying license
A Japanese reprinting of A Commentary on the UNIX Operating System, and accompanying formatted source code, with accompanying license
A Commentary on the UNIX Operating System: Lions Commentary on UNIX 6th Edition with Source Code 1996 reissue[6]
Lions Commentary on UNIX 6th Edition with Source Code 1996 reissue[6]
A Commentary on the UNIX Operating System: Brian Kernighan holding a copy of Lions's Commentary
Brian Kernighan holding a copy of Lions's Commentary

Worked examples

Example 1 — a first encounter with A Commentary on the UNIX Operating System

Start with the simplest possible case. Write down what A Commentary on the UNIX Operating System claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to A Commentary on the UNIX Operating System before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about A Commentary on the UNIX Operating System ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of A Commentary on the UNIX Operating System

In research
A Commentary on the UNIX Operating System appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses A Commentary on the UNIX Operating System in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
A Commentary on the UNIX Operating System is common in secondary-school and first-year university syllabi. It links to neighbouring topics 1976 non-fiction books, Computer programming books, Unix books, so understanding it makes those chapters shorter.
In everyday life
Look for A Commentary on the UNIX Operating System outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “A Commentary on the UNIX Operating System” →

How to study A Commentary on the UNIX Operating System in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what A Commentary on the UNIX Operating System means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain A Commentary on the UNIX Operating System out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is A Commentary on the UNIX Operating System in simple terms?

A Commentary on the Sixth Edition UNIX Operating System by John Lions (later reissued as Lions' Commentary on UNIX 6th Edition and commonly referred to as the Lions Book) is a highly influential 1976 publication containing analytical commentary on the source code of the 6th Edition Unix computer op…

Why does A Commentary on the UNIX Operating System matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study A Commentary on the UNIX Operating System?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on A Commentary on the UNIX Operating System.

Tags

  • 1976 non-fiction books
  • Computer programming books
  • Unix books

Keep exploring