2 ms·
For a short overview read: > http://preshing.com/20120930/weak-vs-strong-memory-models/ http://preshing.com/20120930/weak-vs-strong-memory-models/ If you want
by wolfgke 9y ago
For a short overview read:
> http://preshing.com/20120930/weak-vs-strong-memory-models/ http://preshing.com/20120930/weak-vs-strong-memory-models/
If you want more details of memory models of some CPU architectures, read
> http://www.rdrop.com/users/paulmck/scalability/paper/whymb.2010.07.23a.pdf http://www.rdrop.com/users/paulmck/scalability/paper/whymb.2...
Note that "x86 OOStore" is not a model that you should be concerned about (according to https://groups.google.com/forum/#!topic/linux.kernel/2dBrSeIGYT0 https://groups.google.com/forum/#!topic/linux.kernel/2dBrSeI... it was only used on IDT WinChip)
For a perspective on memory barriers for different memory models with a focus on the Linux kernel look at
> https://www.kernel.org/doc/Documentation/memory-barriers.txt https://www.kernel.org/doc/Documentation/memory-barriers.txt
If you are specifically interested in some subtile details of the x86 memory model, have a look at
> http://www.cl.cam.ac.uk/~pes20/weakmemory/index3.html http://www.cl.cam.ac.uk/~pes20/weakmemory/index3.html
Best begin with
> http://www.cl.cam.ac.uk/~pes20/weakmemory/cacm.pdf http://www.cl.cam.ac.uk/~pes20/weakmemory/cacm.pdf
---
I hope this should give you enough information to start reading up on the subject.
- Splines 9y agoI've found Herb Sutter's talk on std::atomic also useful for understanding this. The 2nd part of his talk goes into some of the differences between x86 and other architectures (about 31 min in): https://channel9.msdn.com/Shows/Going+Deep/Cpp-and-Beyond-2012-Herb-Sutter-atomic-Weapons-2-of-2 https://channel9.msdn.com/Shows/Going+Deep/Cpp-and-Beyond-20...