Skip to content

Sequential consistency

Category: Safety in languages · Status: stub

One line: Operations appear to happen in some single order that respects each task's own order, though not necessarily real time — weaker than linearizability.

Also called: SeqCst.

How it connects

flowchart LR
  n_linearizability["Linearizability"]
  n_sequential_consistency["Sequential consistency"]
  n_linearizability ---|vs| n_sequential_consistency
  classDef center stroke-width:3px
  class n_sequential_consistency center
  classDef outside stroke-dasharray: 4 3
  class n_linearizability outside

In each language

Rust Ordering::SeqCst additionally preserves a total order of such operations across all threads
C The generic atomic_compare_exchange functions use memory_order_seq_cst by default
C++ std::memory_order_seq_cst: the default for all atomic operations, sequentially consistent ordering

Where to read more