# Think OS: an operating systems primer written for people who program in Python

> Think OS is Allen Downey's open textbook on operating systems, written for students who already program in Python and are about to learn C, covering processes, virtual memory, file systems, encoding, dynamic memory, caching, scheduling and threads with supporting C code in the repository. It suits a self-taught programmer or an instructor building a systems course, and it is not a graduate-level OS internals reference.

**AllenDowney/ThinkOS** — Text and supporting code for Think OS: A Brief Introduction to Operating Systems, by Allen Downey.

- Repository: https://github.com/AllenDowney/ThinkOS
- Stars: 572 · Forks: 225
- Language: TeX
- License: not declared
- Published: 2026-10-22 · Updated: 2026-10-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/allendowney-thinkos

## A course for Software Systems students, not for kernel developers

Think OS is A Brief Introduction to Operating Systems by Allen B. Downey, and the preface is unusually explicit about who it is for and who it is not for.

The starting observation is that in many computer science programs, operating systems is an advanced topic taken by students who already know how to program in C and have probably taken a computer architecture class. The usual goal of that class is to expose students to the design and implementation of operating systems, with the implied assumption that some of them will do research in the area or write part of an OS.

This book is for a different audience with different goals. It was developed for a class at Olin College called Software Systems. Most of those students had learned to program in Python, so one of the goals is to help them learn C, and the book is meant to complement Griffiths and Griffiths, Head First C from O'Reilly Media.

The preface makes the point that few of these students will ever write an operating system, but many will write low-level applications in C and some will work on embedded systems. The class itself covers material from operating systems, networks, databases and embedded systems, but emphasizes the topics programmers need to know.

Two consequences follow. The book does not assume computer architecture has been studied; the author says he will explain what is needed along the way. And the stated test of success is that the reader should end up with a better understanding of what is happening when programs run and what can be done to make them run better and faster.

That is a different goal from understanding kernel internals, and it explains the choice of the code that accompanies the text.

## How the chapters are sequenced

The chapter list in the readme is also the curriculum, and its ordering is the pedagogical argument.

Chapter 1 covers the differences between compiled and interpreted languages, with some insight into how compilers work. Chapter 2 covers how the operating system uses processes to protect running programs from interfering with each other. Chapter 3 covers virtual memory and address translation. Chapter 4 is about file systems and data streams. Chapter 5 covers how numbers, letters and other values are encoded, and presents the bitwise operators. Chapter 6 explains how to use dynamic memory management and how it works. Chapter 7 covers caching and the memory hierarchy. Chapter 8 covers multitasking and scheduling. Chapter 9 is about threads, and Chapter 10 covers synchronization with POSIX mutexes and condition variables.

The order is bottom-up in a way that pays off. Processes come before virtual memory, virtual memory before files, encoding before bitwise operators, dynamic memory before caching, and scheduling only after the memory hierarchy is in place. A reader who works through it ends with scheduling and threads, which is where the concurrency material sits, and by then has the process, memory and file abstractions that the concurrency material assumes.

Several chapters also carry recommended reading from Head First C. Chapter 1 pairs with Head First C Chapter 1, Chapter 2 with Head First C Chapter 2, Chapter 3 with Head First C Chapter 3, and Chapter 6 with Head First C Chapter 6. The pattern is a deliberate division of labour: the C language itself is taught elsewhere, and this book teaches what the operating system does to the programs you write in it.

Two things are stated in the future tense, which is worth noticing in a curriculum list: Chapter 9 will be about threads, and Chapter 10 will be about synchronization. That wording indicates the text was still being written when the preface was written.

## What is actually in the repository

The top-level listing is short, and it explains what kind of artefact this is. There are three entries: README.md, book/ and code/.

book/ holds the text, and the primary language of the repository is TeX, which is consistent with a book written in LaTeX rather than a document format. code/ holds the supporting code. There is no build system in the listing, no CI configuration, no issue templates and no tests directory.

That is a meaningful contrast with the software packages the site usually covers, and it is worth being explicit about the difference. This is not a library you install and call. It is a textbook with an accompanying code directory, and the value is in reading the chapters and running the examples yourself.

The code directory is described in the repository description as supporting code, which suggests short programs written to demonstrate a single mechanism rather than a buildable system. For a book aimed at people who have just learned to program in Python and are moving to C, that is the right shape. The examples exist to be read line by line alongside the text, not to be assembled into something.

The download route is separate from the repository. The readme says the book can be downloaded in PDF and HTML from greenteapress.com/thinkos, which hosts it. The repository is the source, the download is the formatted artefact, and the code directory is the companion material.

## Getting the book and its licence terms

There is no installation step, and there is nothing to build for a reader who wants the text. The readme points to the PDF and HTML download at greenteapress.com/thinkos, and the source of the text itself is the book/ directory in this repository, which can be read directly in a TeX-aware editor if you want to work with the source rather than the formatted version.

The copyright line reads Copyright 2014 Allen B. Downey, and the licence is the Creative Commons Attribution-NonCommercial 3.0 Unported License, with the URL given in the readme. The attribution element requires credit to the author, and the non-commercial element restricts use to non-commercial purposes

That combination is the right one for a textbook and it is worth understanding what it does and does not permit. A teacher can redistribute the book to a class, adapt it, and publish the adaptation, provided it is not sold. A company that wants to use the text as part of a paid training product, or that wants a differently licensed edition, has to go and ask.

For a book that has been in print since 2014 and is the companion to a course, the non-commercial term is the part that most often needs checking. It is not a restriction on reading or on using the code as learning exercises, but it is a real constraint on redistribution in a commercial context, and the licence file in the repository is the document that says exactly what it permits.

The licence field on the repository is left unknown, which is consistent with a Creative Commons licence being outside the set GitHub classifies. The readme states it plainly instead, so there is no ambiguity about the terms even if the badge is missing.

## The state of the draft, and what that means for a reader

There is a section on the current version of the book, and it is the most important thing in the readme for anyone considering the project.

The text says the current version of this book is an early draft. While the author is working on the text, the figures have not yet been included, and there are places where the explanation is expected to improve considerably when the figures are ready.

That is an unusually candid statement to find in a book's readme, and it has a practical consequence. A book whose explanation depends on diagrams that are not yet drawn is a book where some arguments will be incomplete. If you are planning to self-study from it, you should expect to fill in some gaps with another source, and the chapters most affected are the ones where a figure would carry the argument, which in a book about processes, address translation and the memory hierarchy means the core material.

The same note explains the future tense in the chapter list. Chapter 9 will be about threads and Chapter 10 will be about synchronization with POSIX mutexes and condition variables, so the concurrency material is the least settled part of the sequence.

The release record is consistent with an in-progress book rather than a software project. There is a single release, v0.7.4, titled Think OS, version 0.7.4, dated on the same day as the last push to the repository, 2026-10-10. A 0.x version number on a book means the author treats it as a draft that is not yet finished, and the pre-1.0 convention in the book world is the same as in software: expect the contents to move.

The upside of this state is that the text is available, complete enough to follow, and free to read and redistribute. The downside is that no single version is the final one.

## Where Think OS is the wrong choice

The first limitation is the audience, and it is explicit. The book assumes the reader can program, and it assumes they are coming from Python into C with a companion text to teach them the language. If your background is C or C++ already, the language framing is overhead rather than help, and if your background is Java or Go the Python-to-C narrative does not apply to you at all.

The second is that the scope is a primer, not a reference. The preface states that the class includes material from operating systems, networks, databases and embedded systems but emphasizes the topics programmers need to know. So the depth on any single subsystem is introductory. A reader who wants to understand how a specific kernel implements its scheduler or its page table will find the level too high and the specificity missing.

The third is the missing figures, and it compounds the audience issue. The author's own note says the explanation will be greatly improved when the figures are ready, which means the current text is a draft of a better book rather than the better book itself.

The fourth is the age of the material in a fast-moving area. The copyright is 2014. Much of the operating system abstraction the book teaches, processes, virtual memory, file systems, is stable, but the surrounding world of the examples and the assumptions about what programmers write in C are twelve years old. Systems programming in 2026 looks different in practice, even when the concepts have not moved.

The fifth is the commercial restriction. Creative Commons Attribution-NonCommercial 3.0 Unported means the book cannot be folded into a paid course or a commercial product without permission, and the repository is a LaTeX source tree rather than a maintained textbook project with an editorial process, so there is no mechanism for contributing corrections beyond the author's own work.

## Conclusion

Think OS fits a self-taught programmer moving from Python into C who needs the mental model of what the operating system does while their code runs, since the chapters are sequenced from compilation through virtual memory to scheduling and threads with working C alongside, and the Creative Commons licence lets you redistribute it freely for teaching. It is the wrong choice for someone who needs the internals of a specific kernel or the reference details of POSIX, and it is the wrong choice if you want a maintained textbook with a current edition, since the readme calls the current version an early draft without figures. Before adopting it, read the preface and the chapter list to see whether the assumed C background matches your students, and note that the last push was on 2026-10-10 with the single release v0.7.4 dated the same day.

## FAQ

### What is Think OS?

Think OS is A Brief Introduction to Operating Systems by Allen B. Downey, an open textbook written for students who already program in Python and are learning C. It was developed for a class at Olin College called Software Systems, and the repository holds the LaTeX source in book/ plus supporting code in code/.

### Which topics does Think OS cover?

Compiled versus interpreted languages, processes, virtual memory and address translation, file systems and data streams, encoding and bitwise operators, dynamic memory management, caching and the memory hierarchy, multitasking and scheduling, threads, and synchronization with POSIX mutexes and condition variables.

### How do I get Think OS?

The readme says the book can be downloaded in PDF and HTML from greenteapress.com/thinkos. There is no installation step, since this is a textbook with supporting code rather than a library, and the source text is the book/ directory in the repository.

### Can I use Think OS in a commercial course?

The readme states the licence is the Creative Commons Attribution-NonCommercial 3.0 Unported License, which permits redistribution and adaptation with attribution but not commercial use. For paid training or a commercial product, permission is needed from the author.

### Is Think OS finished?

Not according to its own readme, which calls the current version an early draft and says the figures have not been included yet, with the explanation expected to improve when they are ready. The only published release is v0.7.4 dated 2026-10-10, and the last push to the repository was on the same day.

## Sources

- [AllenDowney/ThinkOS on GitHub](https://github.com/AllenDowney/ThinkOS)
- [Issues](https://github.com/AllenDowney/ThinkOS/issues)
- [README](https://github.com/AllenDowney/ThinkOS/blob/master/README.md)
- [Releases](https://github.com/AllenDowney/ThinkOS/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/allendowney-thinkos
