Sequential consistency is a data consistency model. It is a weaker model than linearisability, because it doesn’t make any real-time guarantees. Formally, all processes execute operations in some total order. Operations appear to occur instantaneously, consistent with program order (i.e., in the order we see on client machine).

So it preserves the program order of operations, and all processes see the same total ordering of operations.

This consistency model provides better performance than linearisability, because operations across processes can be re-ordered, provided there is some total order.

Intuition

Linearisability provides real-time guarantees, i.e., if A completes before B begins in real-time, then A must be ordered before B. But this isn’t the case in sequential consistency. There will be a total ordering of operations, but:

  • We can get delayed writes, where it may be executed much after its response.
  • And stale reads, where reads may return arbitrarily stale data.

This is still a fairly strong model. For example, consider two threads A, B. Even if a thread is far ahead of another thread, if A has observed some operation from B, it can never observe a state prior to B.