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.

Linearizability and Sequential Consistency的更多相关文章

  1. 数据一致性(consistency)、服务可用性(availability)、分区容错性(partition-tolerance)

    数据一致性(consistency).服务可用性(availability).分区容错性(partition-tolerance) 分布式系统理论基础 - CAP 2016-04-04 18:27 b ...

  2. memory consistency

    目前的计算机系统中,都是shared memory结构,提供统一的控制接口给软件, shared memory结构中,为了memory correctness,可以将问题分为:memory consi ...

  3. Improving cache consistency redis和db的一致性维护

    From  http://simongui.github.io/2016/12/02/improving-cache-consistency.html A typically web applicat ...

  4. 一致性模型(consistency model)

    比如下面的例子: 一行X值在节点M和节点N上有副本 客户端A在节点M上写入行X的值 一段时间后,客户端B在节点N上读取行X的值 一致性模型所要做的就是决定客户端B能否看到客户端A写的值.一致性模型分为 ...

  5. [翻译]内存一致性模型 --- memory consistency model

    I will just give the analogy with which I understand memory consistency models (or memory models, fo ...

  6. 分布式系统理论基础 - CAP

    引言 CAP是分布式系统.特别是分布式存储领域中被讨论最多的理论,“什么是CAP定理?”在Quora 分布式系统分类下排名 FAQ 的 No.1.CAP在程序员中也有较广的普及,它不仅仅是“C.A.P ...

  7. 【转】:ZooKeeper真不是最终一致性的,而是顺序一致性

    转:ZooKeeper真不是最终一致性的,而是顺序一致性 关键字:ZooKeeper / 分布式系统的一致性 我们可以这么理解 ZooKeeper,从整体(read 操作 +write 操作)上来说是 ...

  8. 基于分布式框架 Jepsen 的 X-Cluster 正确性测试

    转自:https://mp.weixin.qq.com/s/iOe1VjG1CrHalr_I1PKdKw 原创 2017-08-27 严祥光(祥光) 阿里巴巴数据库技术 1 概述 AliSQL X-C ...

  9. 分布式系统的一致性级别划分及Zookeeper一致性级别分析

    最近在研究分布式系统的一些理论概念,例如关于分布式系统一致性的讨论,看了一些文章我有一些不解.大多数对分布式系统一致性的划分是将其分为三类:强一致性,顺序一致性以及弱一致性.强一致性(Strict C ...

随机推荐

  1. tomcat 启用Gzip 压缩进行优化

    打开conf/server.xml文件可以看到: <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->     <Con ...

  2. jqurey click和blur执行时间冲突

    参考资料:http://stackoverflow.com/questions/10652852/jquery-fire-click-before-blur-event

  3. [转载] Python的GIL是什么鬼,多线程性能究竟如何

    原文: http://cenalulu.github.io/python/gil-in-python/ GIL是什么 首先需要明确的一点是GIL并不是Python的特性,它是在实现Python解析器( ...

  4. 转:内存区划分、内存分配、常量存储区、堆、栈、自由存储区、全局区[C++][内存管理][转载]

    内存区划分.内存分配.常量存储区.堆.栈.自由存储区.全局区[C++][内存管理][转载] 一. 在c中分为这几个存储区1.栈 - 由编译器自动分配释放2.堆 - 一般由程序员分配释放,若程序员不释放 ...

  5. OpenGL的glScalef缩放变换函数详解

    glScalef是openGL中的模型缩放函数,就是把当前矩阵与一个表示延各个轴对物体进行拉伸.压缩.反射的矩阵相乘.这个物体的每个点的x,y,z坐标与对应的xyz参数相乘. 先看函数定义void g ...

  6. 常用的 文件 MIME类型

    估计很多朋友对不同后缀的文件对应的MIME类型不熟悉(实际上这么多我也记不住), 所以将平常常见的一些文件后缀对应的MIME类型写了一个对照表,现在奉献给大家: .asx,video/x-ms-asf ...

  7. sql cast()和convert()

    19.CAST()函数和CONVERT()函数 CAST()函数可以将某种数据类型的表达式转化为另一种数据类型 CONVERT()函数也可以将制定的数据类型转换为另一种数据类型 19.1 CAST() ...

  8. phonegap插件加载与使用

    有朋友问能不能在CanTK和AppBuilder开发的APP里发送UDP数据,HTML5里只能用HTTPS/HTTP/WebSocket几种通讯方式,要使用UDP需要通过phonegap打包成APK等 ...

  9. JS预解析

    1.在逐行读js代码前,解析器会先提取所有声明的var变量和函数 js解析器会先把脚本里所有var变量声明读一遍,但是它只读变量名字,不读变量值,一开始它会赋给所有读到的var变量一个[未定义]的值. ...

  10. html5中的一些新语义标签

    <header> <nav> <ul> <li><a href="">栏目1</a></li> ...