From CPU caches and reordering to the formal JMM (JSR-133). The happens-before relation's five rules, memory barriers, the double-checked locking bug explained precisely (not hand-waved), safe publication idioms, and final field semantics — the one free publication mechanism.
// Lessons
- 01soon
CPUs, Caches and Registers — Why Shared Memory Is Complicated
- 02soon
Memory Reordering — Compiler and CPU Reorder Differently
- 03soon
Memory Barriers — The Hardware Instruction That Prevents Reordering
- 04soon
The Java Memory Model — What JMM Actually Specifies (JSR-133)
- 05soon
happens-before — The Program Order Rule
- 06soon
happens-before — Monitor Lock and Volatile Variable Rules
- 07soon
happens-before — Thread Start, Join and Interrupt Rules
- 08soon
The Double-Checked Locking Bug — A Missing Volatile Barrier
- 09soon
Safe Publication — How to Share Objects Across Threads Correctly
- 10soon
Final Field Semantics — The One Free Publication Mechanism