HACKER Q&A
📣 stonethrowaway

What Comes After John Lions' Unix Commentary?


Any suggestions from the group here what is a good follow up to the classic John Lions’ commentary on Unix? Do I spring into the tanenbaum books on OS design? Looking for opinions. Feel free to ramble. Thank you!


  👤 al2o3cr Accepted Answer ✓
It's not at all "new" anymore (published 1999), but if you enjoy source-code commentary then check out ISBN 978-1576104699 - "Linux Core Kernel Commentary: Guide to Insider's Knowledge on the Core Kernel of the Linux Code"

Very similar approach to Lions. There's a second volume that covers the networking stack as well.


👤 johndoe0815
It depends a bit on your objectives - do you want to build your own OS, learn more about the theory and algorithms used in operating systems, or do you want to know details about commercial OSes?

For a hands-on view on building operating systems, I can recommend taking a look at xv6 [1] as the next step. This is a modern reimplementation of a subset of the 6th edition Unix, running on RISC-V in its current version (an older version targeted x86) [2].

The classical textbooks used in OS courses (Tanenbaum's "Modern Operating Systems", Silberschatz' "Operating System Concepts" and Stallings' "Operating Systems") are more on the theoretical side, whereas Tanenbaum's Minix books are more hands-on. A current, somewhat more hands-on, textbook is "Operating Systems: Three Easy Pieces" by Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau. Additional bonus - it's free [3].

For more hands-on resources, there's a lot of material available. osdev.org [4] provides lots of OS development knowledge in wiki form, Stephen Marz' "The Adventures of OS: Making a RISC-V Operating System using Rust" [5] is a hands-on course written as a series of blog posts to build your own OS for RISC-V (but it needs to be updated since RISC-V has changed in some details since the articles were published). I learned about OS theory and practice using Doug Comer's Xinu books [17] and I still think these are very useful.

You can then dig into older Unix(-like) systems, e.g. BSD [6,7] and/or check out more modern approaches such as Microkernels (I can especially recommend L4, starting from Jochen Liedtke's papers [8] and checking out work on seL4 [9]), capability-based systems (CHERI [10] and an old, but good overview book on capability architectures [11]), or - for something a bit more exotic - Plan 9 [12].

If you want to gain an insight into commercial operating systems, there are a number of interesting books on Apple's OS X and iOS [13,14], Windows [15] and even VMS [16].

  [1] https://github.com/mit-pdos/xv6-riscv/

  [2] Russ Cox, Frans Kaashoek, Robert Morris
      xv6: a simple, Unix-like teaching operating system
      https://pdos.csail.mit.edu/6.S081/2020/xv6/book-riscv-rev1.pdf

  [3] https://pages.cs.wisc.edu/~remzi/OSTEP/

  [4] https://wiki.osdev.org/Main_Page

  [5] https://osblog.stephenmarz.com

  [6] Marshall Kirk McKusick , Keith Bostic, Michael J. Karels 
      The Design and Implementation of the 4.4BSD Operating System
      Addison Wesley, ISBN-13: ‎ 978-0201549799

  [7] Marshall Kirk McKusick, George V. Neville-Neil, Robert N.M. Watson
      The Design and Implementation of the FreeBSD Operating System
      Addison Wesley, ISBN-13: 978-0321968975

  [8] https://en.wikipedia.org/wiki/L4_microkernel_family

  [9] https://sel4.systems

  [10] https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/

  [11] Henry M. Levy 
       Capability-Based Computer Systems
       https://homes.cs.washington.edu/~levy/capabook/

  [12] Francisco J Ballesteros
       Notes on the Plan 9 3rd edition Kernel Source
       http://www.r-5.org/files/books/computers/internals/unix/Francisco_Ballesteros-Notes_on_the_Plan_9_Kernel_Source-EN.pdf

  [13] Amit Singh
       Mac OS X Internals: A Systems Approach
       Pearson 2006, ISBN-13: 978-0-321-46795-9

  [14] Jonathan Levin
       *OS Internals (Volume I: User Mode, Volume II:Kernel Mode, Volume III: Security & Insecurity)
       https://newosxbook.com/home.html

  [15] https://learn.microsoft.com/en-us/sysinternals/resources/windows-internals

  [16] VAX/VMS Internals and Data Structures
       http://www.bitsavers.org/pdf/dec/vax/vms/training/EY-00014-DP_VMS_Internals_and_Data_Structures_1984.pdf

  [17] https://xinu.cs.purdue.edu

👤 ggm
Plan9