From following 2 books, I got laid out the available memory ordering models: ======================== "A Primer on Memory Consistency and Cache Coherence, ISBN: 9781608455645" SC Sequential consistency Perf. drop, most consistent and simple p25 TSO Total store order p43 XC Relaxed consistency For improved performance for relaxed order p58 ========================== C++ concurrency in action, 978-1-933988-77-1 memory_order_seq_cst Perf. drop, most consistent and simple p124 memory_order_relaxed For improved performance for relaxed order p127 memory_order_release Trade-off between relaxed and SC, optimization between pair of threads p132
First one gives mostly conceptual views whereas the c++ concurrency gives more concrete coverage with examples. Upon comparing I can draw out 1-to-1 mapping between SC and memory_order_seq_cst and Relaxed consistency as well as XC (relaxed consistency) and memory_order_relaxed. It appears TSO and memory_order_release does not seem to relate to each other well. I am still deep diving and see what I can find out.
_________________ key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails
|