Preface#

In late 2021 Jonathan Appavoo started discussing with us his vision of creating open source interactive educational materials. You can see an early talk on this here. Somehow, we found ourselves committing to writing an operating system textbook, and here we are. You will eventually find in the repository three kinds of information:

  1. This textbook which will largely be static content.

  2. Lab materials which will include significant amounts of interactive content.

  3. Lecture slides

Right now, we are focused only on the textbook portion of this materials. It can be largely read statically; and you can even download a PDF (see download symbol top right). However, we strongly recommend using it online going back and forth between different materials via the provided links. We provide a companion container (an OS concept we will discuss which we strongly recommend you keep open alongside the material and use to run exercises. The lab materials are intended to execute in the container. Moreover, the container has the curated set of tools that we expect you to use for the course, and provides the same environment as the assignments; you are likely to run into problems if you work on the assignments outside of the container environment and don’t expect TAs to help you if you do that.

Please see here for the list of contributors. This text was originally developed for the Boston University course EC440 Introduction to Operating Systems. You can view this text online or view the source.

Our motivation#

Our motivation to write this book is three fold. First, our students pay way too much money for textbooks. At one point, students could buy used textbooks, although even then publishers would constantly churn editions to get students to buy new versions. Increasingly, textbooks contain interactive materials, that force students to buy the most recent edition; again its about the money. Free online books (FOB) provide us the opportunity to address this cost issue, while also enabling frequent revisions and extensive linking between different materials. The motivation for FOB for operating systems is described in the excellent blog by Remzi Arpaci-Dusseau. Moreover, the excellent operating system FOB titled “Operating Systems: Three Easy Pieces[ADAD18], is enormously better than our effort today. So why are we developing another FOB? That leads to our next two reasons.

Second, we have found students think in many different ways and repetition at multiple different levels of detail is incredibly important to understand operating systems. The Three Easy pieces FOB does a great job of interlinking materials, enabling students to approach the material in multiple ways. However, with jupyter book and containers we can go much further; enabling dynamic content that is deeply connected to the book. Our own experience as OS developers and researchers is that we don’t understand anything until we have played with code; we hope that the model we are developing based on Jonathans OPE will enable us to give students more of that experience. In fact, as Jonathan articulates so well in the talk referenced above, students today have grown up with so many levels of software complexity obscuring the systems they are using that this interactive experience is critical to enable systems to be approached.

Third, as operating system researchers and developers that have experienced the entire growth of open source, we believe that open source can be an enormously powerful tool for educational materials. Textbooks get out of date soon after they are written; and this is especially the case in operating systems which are one of the most rapidly evolving technical areas. We believe that only an open source community will be able to create educational materials that evolve as fast as the topics they cover. While we respect Remzi’s perspective from [ADAD18] that “a book should have a single voice”, our own frustration of teaching from materials developed by others has led us to want to enable instructors to be able to modify any part of our content to teach operating systems in a way that reflects their background, their community of students, and their own biases. Feel free to fork our book at make it your own. We do hope that people will be motivated to offer their changes back to us; and they can do so using the same mechanisms used by community projects like Linux. Hopefully, we can do a good job and create standards and a community such that the material has a coherent single voice; if not, perhaps someone that is better at it will fork our book and create such a community.

Book Overview#

For detailed instructions on how to read this book and launch the container associated with it, please refer here. The book is divided into multiple sections, each with small chapters that should hopefully be relatively fast reads. The first part, Getting Started, gives an overview of the entire book and the tools operating system developers like you will need to know. The next three parts describe three of the core services of operating systems, namely Scheduling, Memory Management, and file systems. The next part, concurrency, introduces some of the most complicated aspects of operating systems to deal with the parallelism of todays platforms, namely threads, synchronization, and deadlock. We have lumped a bunch of important topics that are typically only covered briefly in an introductory OS book, including security, virtualization, a bit on the history of operating systems and alternative OS structures. Finally the appendices have chapters on how to read and contribute to this book.

Warning

This book is a work in progress, most parts are today just scaffolding, and a community is working hard to try to get materials in place as we are actively reading it. We hope you will consider contributing to this effort by reporting issues you find.