The Mutability Matrix of Pain
summary
Explains how JVM heap, thread stacks and concurrency primitives map to Java/Scala code and gives concrete rules: locks cause kernel arbitration and cache loss, memory barriers cost time, and Akka guarantees happens-before so mailboxes can batch work. Recommends measuring with JMH benchmarks, warns generational GC behavior and a practical ~4GB heap threshold that produces long pauses, quantifies a flush to RAM as 66 nanoseconds (~180 cycles), shows a common pattern using volatile on last field to publish grouped updates (mailbox batch default 5 / can set 100).
AI-written summary · about
chapters (6)
- 0:00Introduction
- 1:51Lay the groundwork
- 4:40Java memory model
- 7:38Parallel vs Concurrency
- 16:29The Matrix
- 18:57Implications
related talks
37mThe Mutability Matrix of Pain: An Accessible Exploration of the JVM Heap
40mA practical approach to Java Memory Model
48mConcurrency: It’s Harder (and Easier) Than You Think
45mJava Memory Consistency Model
36mConcurrency — Java Memory Model — Not Just for Eagles
50mThe Hidden Art of Thread-Safe Programming: Exploring java.util.con...
22mJava Memory Model
37mConcurrency options on the JVM
