trying to map the concept of mem coherency to c++
Posted: Mon Oct 07, 2019 1:24 pm
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.
========================
"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.