There are two definitions I found on the Internet:
Sequential consistency -- the result of any execution is the same as if the operations of all the processors were executed in some sequential order, and the operations of each individual processor appear in this sequence in the order specified by its program.
Eventual Consistency -- if no new updates are made to a given data item, eventually all accesses to that item will return the last updated value.
The definitions are clear to me. However, I don't get when eventual consistency is not sequential. An example: Initial val in mem is 0. Horizontal axis is the time.
P1: write 1 (x)
P2: read 0 read 0 read 0 read 1 read 1 read 1
So, there is some sequential order, the one if we put "write 1" in (x) slot, and this is sequential consistency by definition. Where am I wrong?
Strong Consistency offers up-to-date data but at the cost of high latency. While Eventual consistency offers low latency but may reply to read requests with stale data since all nodes of the database may not have the updated data.
a) Sequential Consistency → Causal Consistency In sequential consistency, all writes must be seen in the same order by all processes. In causal consistency, causally related writes must be seen in the same order.
Sequential consistency is a strong safety property for concurrent systems. Informally, sequential consistency implies that operations appear to take place in some total order, and that that order is consistent with the order of operations on each individual process.
The difference between sequential consistency and eventual consistency is in the guarantees they provide.
Eventual consistency doesn't specify:
As a result, even a single client may run into a situation when she modifies a register but a follow up read returns stale data.
The same case is impossible with sequential consistency by definition (the overall order respects the sub-processors order).
Moreover, if a program doesn't make time-sensitive assumptions and all the clients (processors) don't communicate outside of the system then sequential consistency is indistinguishable from linearizability. On the contrary, eventual consistency is much closer to the lack of consistency rather than to linearizability.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With