LobstersAndrew Helwer8 min readintermediate
Textbook review: Is Parallel Programming Hard, And, If So, What Can You Do About It?
Summary
A detailed, personal review of Paul McKenney’s free online textbook on parallel programming. The author, coming from a TLA⁺/distributed‑systems background, finds the early chapters excellent for building intuition about CPU caches, memory ordering, and false‑sharing, but notes gaps (e.g., shallow coverage of C++11 atomics and MESI). The review is concrete, cites specific chapters, and offers prac…
- Understanding hardware cache protocols (MESI) is crucial; the book mentions it only in an appendix, forcing readers to look it up elsewhere.
- Compiler optimizations (load/store tearing, fusing, invented loads) can completely break naïve concurrent code – the book’s “Shared‑Variable Shenanigans” chapter illustrates this well.
- False sharing dramatically hurts performance; per‑thread counter arrays (conflict‑free replicated data types) are a good pattern to avoid it.
- The text focuses heavily on Linux‑kernel specifics; coverage of C++11/C11 memory‑order primitives (`std::memory_order`, `ACCESS_ONCE`) is brief.
Parallel programming bugs are notoriously hard to reproduce and debug. This review highlights a free, comprehensive resource that bridges low‑level hardware realities with software‑level concurrency pitfalls—knowledge essential for building correct, high‑performance systems.
6/10


