Skip to main content

Data-centric consistency models

Short answer

Data-centric consistency models include strict, linearizability, sequential, causal, FIFO, and weak/release/entry consistency. Sequential consistency ensures that the result of execution is as if all operations were executed in some sequential order, and operations of each process appear in program order; all processes see the same interleaving. For example, if two processes write different values, all other processes must see those writes in the same order. Implementation uses a sequencer or totally ordered multicast of writes.

Specify Data Centric consistency models and explain any one of them in detail.

A consistency model is a contract between the data store and its processes: if processes follow certain rules, the store guarantees results of reads and writes in a predictable way. Data-centric models describe the consistency of the store as seen by all processes (system-wide), as opposed to client-centric models.

Data-centric consistency models

  1. Strict consistency: any read returns the result of the most recent write in absolute global time. Impossible in a real distributed system.
  2. Linearizability: operations appear in a single sequential order consistent with real-time (timestamps) order.
  3. Sequential consistency: the result is as if all operations were executed in some sequential order, and operations of each process appear in program order. All processes see the same order.
  4. Causal consistency: writes that are causally related are seen in the same order by all processes; concurrent writes may be seen in different orders.
  5. FIFO (PRAM) consistency: writes from one process are seen in the order issued; writes from different processes may be seen in different orders.
  6. Weak, release and entry consistency (using synchronization variables): consistency is enforced only at synchronization points (e.g. acquire/release of a lock).

Sequential consistency in detail

Let processes operate on a data item x, which initially has no value (NIL).

P1: W(x)a
P2:       R(x)NIL  R(x)a      <- sequentially consistent
P1: W(x)a
P2: W(x)b
P3:   R(x)b  R(x)a
P4:   R(x)a  R(x)b            <- not sequentially consistent

In the first case, there is a single valid order in which reads see the writes. In the second, P3 and P4 see the two writes in different orders, so no single order exists. In a sequentially consistent store, all processes must see the writes in the same order (here either both see b then a, or both a then b).

Implementation: use a sequencer or totally ordered multicast of writes (e.g. primary-based or replicated-write protocols). Its drawback is that the cost of ordering limits performance, which is why weaker models are used.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Distributed System chapter 7 questions →