4 ms·
Can you recommend some good resources on Memory/Consistency Models, Memory Ordering, Memory Barriers and related subjects? I find in most blogs everything is ex
by rramadass 5y ago
Can you recommend some good resources on Memory/Consistency Models, Memory Ordering, Memory Barriers and related subjects? I find in most blogs everything is explained piecemeal and never comprehensively. The problem is that there are both Compiler Orderings and Barriers vs. Processor Orderings and Barriers and you have to know both for effective understanding.
- bitcharmer 5y agoNot ideal but a good place to start would be SO: https://stackoverflow.com/questions/tagged/memory-barriers https://stackoverflow.com/questions/tagged/memory-barriers https://stackoverflow.com/questions/tagged/memory-model https://stackoverflow.com/questions/tagged/memory-model https://stackoverflow.com/questions/tagged/java-memory-model https://stackoverflow.com/questions/tagged/java-memory-model Also, the x86 tag on SO has plenty of memory model-focused discussions although it's only TSO.
- oshiar53-0 5y agohttps://man7.org/linux/man-pages/man2/membarrier.2.html https://man7.org/linux/man-pages/man2/membarrier.2.html provides a good example of when a processor memory barrier is eliminated but a compiler memory barrier is still required.
- froh 5y agoThe OP blog references their learning resources, which include some freely available books, like https://cdn.kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html https://cdn.kernel.org/pub/linux/kernel/people/paulmck/perfb...
- philzook 5y agoI've been collating resources I've found here https://www.philipzucker.com/notes/CS/Concurrency/ https://www.philipzucker.com/notes/CS/Concurrency/ The replies to this John Regehr thread were particularly rich with links https://twitter.com/johnregehr/status/1451355617583460355?s=20 https://twitter.com/johnregehr/status/1451355617583460355?s=...
- rramadass 5y agoFYC; You may find this book useful for a comprehensive overview (though dated) of Concurrency Paradigms: Foundations of Multithreaded, Parallel, and Distributed Programming by Gregory Andrews (https://www2.cs.arizona.edu/~greg/ https://www2.cs.arizona.edu/~greg/).