
The little book of semaphores
by Allen B. Downey · first published 2008
25mentions
18recommended by
22HN commenters
2010–2022first – last mentioned
82% recommend18% neutral
Why HN recommends it
Free, approachable introduction to synchronization and multithreading, built on puzzles with solutions (Dining Philosophers and similar) with Python examples. Brief and readable for OS students and concurrent coders.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.







Just coming here to give my usual thank you/plug to Allen B. Downey for all of his wonderfully written (and free!) books. Aside from The Little Book of Semaphores, here are a few of my favorites: How To Think Like A (Functional) Programmer ("Think OCaml") - http://greenteapress.com/thinkocaml/index.html Think Operating Sytems - http://greenteapress.com/thinkos/index.html…
on “The Little Book of Semaphores [pdf]” ↗Thanks, you got me interested. There's a free PDF of "The Little Book of Semaphores" by Allen Downey (and a video) here: http://greenteapress.com/semaphores/
on “How to Think Like a Computer Scientist” ↗There's a free book available on the subject of semaphores: The Little Book of Semaphores by Allen Downey http://greenteapress.com/semaphores/
on “Linus Torvalds on semaphores (1999)” ↗There's also the free textbook The Little Book of Semaphores: http://greenteapress.com/semaphores/
on “Get your hands dirty with Threads and Semaphore [pdf]” ↗…Like a Computer Scientist - Think Bayes: Bayesian Statistics in Python - Think Complexity: Exploring Complexity Science with Python - Think Stats: Probability and Statistics for Programmers - The Little Book of Semaphores - Physical Modeling in MATLAB - Learning Perl the Hard Way few others. Do check the site. Secondly, books by Al Sweigart[2] are also freely available. They include: - Automate the Boring Stuff with…
on “Ask HN: What are your recommended reads that are available for free?” ↗…Erlang by Joe Armstrong Programming Elixir by Dave Thomas Seven (more) Languages In Seven Weeks by Bruce Tate Think Bayes, Think OS, How To Think Like A Functional Programmer (Think OCaml) and The Little Book of Semaphores by Allen B. Downey
on “Ask HN: What are some of the best written programming books?” ↗Highly recommended: Allen Downey The Little Book of Semaphores (free pdf here: http://greenteapress.com/wp/semaphores/)
on “Teaching Concurrency (2009) [pdf]” ↗Allen B. Downey's "The Little Book of Semaphores" is a great resource if you want to go a bit further on understanding how to use these things and design solutions to synchronization problems. It's available for free: https://greenteapress.com/wp/semaphores/
on “Locks, Mutexes, and Semaphores: Types of Synchronization Objects (2014)” ↗Little Book of Semaphores https://greenteapress.com/wp/semaphores/ while not on the front page is a really good book that you should read if you are interested in multithreaded programming. It has a bunch of interesting puzzles…
on “Green Tea Press: Free Books by Allen B. Downey” ↗The Little Book of Semaphores: https://greenteapress.com/semaphores/LittleBookOfSemaphores.... It's about multithreading synchronization issues like the Dining Philosopher's problem, and it's brief, interesting, and very readable.
on “Ask HN: Most interesting, mildly impractical, well-written books on software?” ↗…accessible style, such as The Little Schemer, The New Turning Omnibus, and Programming Pearls (not Perl but Pearls by Jon Bentley). Or, books that are written in problem-hint-solution style, such as The Little Book of Semaphores and To Mock a Mockingbird. These are so fun and easy to read.
on “Books that changed my career as a software engineer” ↗…paradigm, for example, Model-View-Control (MVC) is universal to procedural/imperative, functional, and object-oriented code. Design patterns also exist for concurrent computation -- a great example is "The Little Book of Semaphores" (http://www.greenteapress.com/semaphores/). The book details multiple "design patterns" for solving common problems with concurrent computation in languages that provide semaphores and threads as the…
on “Design patterns are just tools” ↗I'm so glad to see The Little Book of Semaphores on here, especially in the top 5. I didn't expect to see it on a list like this, but I found it to be immensely helpful. In my OS class last semester, my prof mentioned it almost in passing, so I don't…
on “My Top 100 Programming, Computer and Science Books: Part One” ↗I think you really ought to have to read Little Book of Semaphores before you're allowed to touch multi-threaded code. [1] [1] - http://www.greenteapress.com/semaphores/downey05semaphores.p...
on “Must Be This Tall to Write Multi-Threaded Code” ↗You may want to start with "The little book of semaphores" before delving into the concurrency models of a language. I have not found a more approachable text for understanding/solving synchronization problems. http://greenteapress.com/semaphores/LittleBookOfSemaphores.p...
on “Level Up Your Concurrency Skills with Rust [video]” ↗