modification order:
- atomic vars are an array of writes, each write tagged if its Release + tagged if its rmw
- reads to it return some write in the array, each read tagged if its Acquire or not
- an rmw, atomically, pushes a write and returns the previous last-write as a read. So it can be tagged both Acquire (for the read part) & Release (for the write part)
coherence:
- each thread could be reading from different points in a given atomic-var write-array
- in each thread, a read never goes backwards i.e.
read a[1]; read a[0]is invalid, but1; 1or1; 2is fine - different read points also means threads could see writes to multiple arrays happen in different orders e.g. T1 does a.push(x); b.push(y) but T2 could see b's push before seeing a's push (T2's a-cursor hasnt updated yet)