6.5080 Multicore Programming -
6.5080 Multicore Programming is not merely a course about APIs; it is a course about disciplined thinking under nondeterminism. It replaces the comforting linearity of sequential code with a rigorous engineering discipline. The student emerges with three lifelong reflexes: (1) distrust shared mutable state by default; (2) prefer composable, high-level patterns (fork-join, pipelines) over raw low-level locks; and (3) measure before optimizing—your intuition about parallelism is almost always wrong. As processor architectures move toward hybrid designs (performance cores + efficiency cores, chiplets, and near-memory computing), the principles taught in 6.5080 remain foundational. The free lunch may be over, but with the skills from this course, the engineer can cook their own parallel feast.
Recognizing that locks have fundamental limits (blocking, priority inversion, and convoying), 6.5080 introduces non-blocking synchronization. Students implement a lock-free stack using operations. They learn the ABA problem (a pointer changes from A to B and back to A, fooling the CAS) and solve it with tagged pointers or double-word CAS. 6.5080 multicore programming
Mastering Concurrency: The Principles and Practices of 6.5080 Multicore Programming Students implement a lock-free stack using operations
More subtly, 6.5080 introduces —specifically, the Total Store Order (TSO) used by x86 and the weaker Relaxed Memory model of ARM and PowerPC. Through hands-on experiments, students discover that without memory barriers, a thread may read a stale value even after another thread has visibly written a new one. This module’s key takeaway is that correctness in multicore programming is not merely about avoiding race conditions in logic; it is about controlling the order of memory operations as observed by different cores. This dramatically simplifies reasoning (no deadlock
The most contemporary module covers (TM). Both hardware (HTM on Intel TSX) and software (STM) implementations are examined. Students write code where critical sections are marked as atomic transactions. The system optimistically executes the code and aborts if a conflict is detected. This dramatically simplifies reasoning (no deadlock, no lock ordering), but introduces new challenges: transaction size limits, irrevocable actions, and performance collapse under contention. Through benchmarking, the course concludes that while TM is not a universal silver bullet, it excels for complex composite operations (e.g., transferring money between two bank accounts) where fine-grained locking would be a nightmare.