
Textbook review: Is Parallel Programming Hard, And If So, What Can You Do About It?
Andrew Helwer has published a detailed review of Paul E. McKenney's free textbook on parallel programming: what worked, what did not, and where the text stays tied to the Linux kernel.
Andrew Helwer has published a detailed review of Is Parallel Programming Hard, And, If So, What Can You Do About It?, the free online textbook by Paul E. McKenney, the author of the Linux kernel's RCU synchronization mechanism. Helwer read much of the book during a family vacation and describes what worked, what did not, and where the text stays tied to the Linux kernel context.
From distributed systems to lock-free code
After a decade spent around TLA⁺ and distributed systems, Helwer came to the book from the 2026 Software Should Work conference in Columbia, Missouri. A conversation there with Filip Pizlo about the difficulty of writing a concurrent, lock-free garbage collector showed him how little he actually knew about concurrency. Pizlo also argued that TLA⁺ is not well suited to reasoning about events that happen literally concurrently, and stressed the importance of linearizability. Helwer wanted a text focused on lock-free programming rather than mutexes or message passing.
CPU caches, compiler tricks and counters
Chapter 3, "Hardware and its Habits", explains what makes modern CPUs fast and what makes them slow, including the case of a core writing to an address that is missing from its cache. The MESI cache-coherence protocol appears only in the appendix, yet learning about it clarified the rest of the book: x86 cores write to their own caches and need exclusive ownership of a cacheline, so literally concurrent writes to one location do not happen — though writes that span several cachelines can be torn.
Chapter 4, "Tools of the Trade", catalogues what a compiler may do to careless parallel code: load and store tearing, load and store fusing, code reordering, invented loads and stores, store-to-load transformations and dead-code elimination — before the CPU adds surprises of its own at run time. Chapter 5, "Counting", is the marquee chapter: roughly ten ways to write a program in which several threads increment one counter, with naive atomic increments dismissed for their poor performance, ending in a signal-theft limit counter. Helwer's favourite is the array-based per-thread statistical counter, which resembles conflict-free replicated datatypes from distributed systems and exposes the cost of false sharing.
Verdict
His main criticism is the book's Linux-kernel specificity: the C++11 and C11 work on memory models, such as std::memory_order, receives only short paragraphs, and older debates over whether benign data races were errors are skipped. Lock-free programming waits until chapter 14 and memory ordering until chapter 15; by then he had turned to outside sources. The book's many internal links, useful for its knowledge-check questions, are also awkward on e-readers. Even so, Helwer rates the textbook excellent, and says it left him eager to learn more — next on his list is high-performance garbage collection.
SiTech — AI-powered web development
We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.