p.enthalabs

Memory Ordering in CPUs

fgiesen.wordpress.com · Read Story HN original

Comments

As a measly backend programmer, I only have a good mental model of a “lock”, think a sync.Mutex in Golang.

But I wanted to go deeper into the rabbit hole and understand concepts like memory ordering and how atomic operations are actually implemented using the abstractions hw provides.

Any book recommendations or exercises I could do to learn more about this. Thanks.

Rust Atomics and Locks by Mara Bors (https://mara.nl/atomics/) is a very good book and available for free online. It does require knowing Rust at least in a basic level, but it explains things very well.