5 ms·
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 u
by AbbeFaria 24d ago
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.
- matt_d 24d agoI'd recommend "A Primer on Memory Consistency and Cache Coherence, Second Edition" - Synthesis Lectures on Computer Architecture 15:1 (2020) - Vijay Nagarajan, Daniel J. Sorin, Mark D. Hill, David A. Wood - (open access, freely available): https://doi.org/10.2200/S00962ED2V01Y201910CAC049 https://doi.org/10.2200/S00962ED2V01Y201910CAC049 For more see: https://github.com/MattPD/cpplinks/blob/master/atomics.lockfree.memory_model.md https://github.com/MattPD/cpplinks/blob/master/atomics.lockf...
- afdbcreid 24d agoRust Atomics and Locks by Mara Bors (https://mara.nl/atomics/ 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.