What is memory consistency?
Memory consistency defines the order of access to different addresses.
When do memory consistency issues happen?
When the processor reorders instructions and interleaved instructions from different cores can result in an output that is not possible if executed in program order
What is sequential consistency?
The result of any execution should be as if accesses executed by each processor were executed in-order and accesses among different processors were arbitrarily interleaved
How to implement sequential consistency
What is relaxed consistency?
Class of consistency that is more relaxed than sequential, but better than nothing.
What are the 4 types of ordering?
WR A -> WR B
WR A -> RD B
RD A -> WR B
RD A -> RD B
What is the MSYNC instruction?
special x86 instruction that guarantees that all accesses are completed before MSYNC, and that MSYNC happens before all subsequent accesses
What is a data-race free program?
Use barriers to achieve sequential consistency, even if hardware is not using it