Explain why sequential consistency is weaker than linearizability, and why this relaxation makes it easier to implement efficiently in distributed systems.
Think about your answer, then reveal below.
Model answer: Linearizability requires the total order of operations to respect real-time: if one operation's effect is visible (it 'completed') before another begins, the first must appear earlier in the total order. Sequential consistency drops this requirement — the total order only needs to preserve each process's own program order, with no constraints on cross-process real-time ordering. In a distributed system, enforcing real-time ordering requires tight coordination: nodes must communicate to agree on whether one operation 'completed' before another 'began,' typically requiring synchronization protocols with communication overhead proportional to latency. Sequential consistency allows nodes to operate independently, batching and reordering across nodes freely, as long as they report a consistent program-order-preserving sequence to each client — achievable with cheaper coordination mechanisms like causal ordering or vector clocks.
The real-time constraint in linearizability is what makes it expensive: to guarantee that a completed write is visible to subsequent reads from any process, the system must synchronize across all replicas before acknowledging the write. Sequential consistency allows writes to propagate asynchronously as long as the ordering seen by each individual client is consistent with program order. For many applications (feeds, timelines, document viewing) this weaker guarantee is sufficient and comes at significantly lower latency cost.