Linearizability and Sequential Consistency

Linearizability and Sequential Consistency



a)

A sequentially consistent data store.

b)

A data store that is not sequentially consistent.

Sequential Consistency

A data store is sequentially consistentwhen the result of any execution is the same as if the (read and write)operations by all processes on the data store were executed in some sequentialorder and the operations of each individual process appear in this sequence inthe order specified by its program.

Translation into English: any valid interleaving of read and writeoperations is OK, butall processes must see the same interleaving. Inother words,theevents observed by each process must globally occur in the same order, or it isnot sequentially consistent.It doesn't actually matter if the eventsdon't really agree with clock time, as long as they are consistent.

Important facts:

  • Time doesn't matter as much. That is, absolute time is somewhat irrelevant. The order of events is most important.
  • A process only observes writes made by other processes. Reads by other processes are completely irrelevant to it.

Audio link: Why is (a) consistent and (b) not?

Linearizable

The linearizable consistency model handles the apparent incongruityabove. Specifically, itlooks like the write of the value a to xoccurred before the write of the value b. Thus, (intuitively) you might thinkthat, accounting for propagation delays, etc., processes 3 and 4 should firstread a value of a, then later read a value of b (either that or, you'd intuit thatthe value b is always read, and the value a isnever read, which wouldbe true in certain circumstances). The linearizable consistency model ensuresthis by adding a timestamp ts_{op}(x) (sorry about the text formatting but htmljust doesn't do it yet). This timestamp is simply the global time (in a loosesense) assigned to an operation OP.It is the same definition as sequential consistency withthe additional constraint that if the timestamp of x is less than the timestampof y then x must occur before y in the sequence.

Since it's the same definition withadditional constraints, it implies that a linearizable data store is alsosequentially consistent (but not the other way around, of course).

原文地址:http://regal.csep.umflint.edu/~swturner/Classes/csc577/Online/Chapter06/img06.html

 

附加内容:

Summary of Consistency Models

a)Consistency models not using synchronization operations.
b)Models with synchronization operations.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值