Memory model
❧
Memory order was a mystery for me for a long time. I have heard about it for
the first time when I was reading first edition of C++ Concurrency in Action
(in Polish). I used std::memory_order maybe few times as a training and never
came back. Last year, when I was reading Rust Atomics and
Locks I found this topic was described
quite well in this book.
Memory order, memory consistency and coherence are topics that are not covered in most programming books. Higher level languages often don't provide any way to instruct compiler/CPU on memory order rules. I think this topic is quite interesting and I'm currently studying it. My current lecture is A Primer on Memory Consistency and Cache Coherence, Second Edition, however I also recommend:
What I'm planning to look through:
- Is Parallel Programming Hard, And, If So, What Can You Do About It?
- [Memory Order Guarantees in Go](https://go101.org/article/memory-model.html0