Multicore & Synchronization
What is a characteristic of the x86 memory consistency model (TSO, total store order)?
- AIt is the weakest model, allowing every combination of reordering
- BIt is exactly sequential consistency, allowing no reordering at all
- CIt is a relatively strong model that allows only a later read of a different address to appear before an earlier write
Show answer and explanation
Answer: C. It is a relatively strong model that allows only a later read of a different address to appear before an earlier write
Under TSO, writes stay ordered with writes, reads with reads, and a write after a read stays ordered; only a read of a different address may overtake an earlier write. This model directly reflects the presence of a store buffer. Many programs behave intuitively within these limits, so barriers are needed relatively rarely on x86.
- A. That is closer to weak models such as Arm or RISC-V.
- B. Write-then-read reordering does occur.
- C. Correct. Only the reordering caused by the store buffer is visible.