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. |
Linearizability and Sequential Consistency的更多相关文章
- 数据一致性(consistency)、服务可用性(availability)、分区容错性(partition-tolerance)
数据一致性(consistency).服务可用性(availability).分区容错性(partition-tolerance) 分布式系统理论基础 - CAP 2016-04-04 18:27 b ...
- memory consistency
目前的计算机系统中,都是shared memory结构,提供统一的控制接口给软件, shared memory结构中,为了memory correctness,可以将问题分为:memory consi ...
- Improving cache consistency redis和db的一致性维护
From http://simongui.github.io/2016/12/02/improving-cache-consistency.html A typically web applicat ...
- 一致性模型(consistency model)
比如下面的例子: 一行X值在节点M和节点N上有副本 客户端A在节点M上写入行X的值 一段时间后,客户端B在节点N上读取行X的值 一致性模型所要做的就是决定客户端B能否看到客户端A写的值.一致性模型分为 ...
- [翻译]内存一致性模型 --- memory consistency model
I will just give the analogy with which I understand memory consistency models (or memory models, fo ...
- 分布式系统理论基础 - CAP
引言 CAP是分布式系统.特别是分布式存储领域中被讨论最多的理论,“什么是CAP定理?”在Quora 分布式系统分类下排名 FAQ 的 No.1.CAP在程序员中也有较广的普及,它不仅仅是“C.A.P ...
- 【转】:ZooKeeper真不是最终一致性的,而是顺序一致性
转:ZooKeeper真不是最终一致性的,而是顺序一致性 关键字:ZooKeeper / 分布式系统的一致性 我们可以这么理解 ZooKeeper,从整体(read 操作 +write 操作)上来说是 ...
- 基于分布式框架 Jepsen 的 X-Cluster 正确性测试
转自:https://mp.weixin.qq.com/s/iOe1VjG1CrHalr_I1PKdKw 原创 2017-08-27 严祥光(祥光) 阿里巴巴数据库技术 1 概述 AliSQL X-C ...
- 分布式系统的一致性级别划分及Zookeeper一致性级别分析
最近在研究分布式系统的一些理论概念,例如关于分布式系统一致性的讨论,看了一些文章我有一些不解.大多数对分布式系统一致性的划分是将其分为三类:强一致性,顺序一致性以及弱一致性.强一致性(Strict C ...
随机推荐
- 14 Using Indexes and Clusters
do not build indexes unless necessary. 索引是非常占资源的To maintain optimal performance, drop indexes that a ...
- MVC中Url请求与控制器的默认约定
1.请求的url如:http://localhost:52481/Home/Browse?genre=1控制器方法:public string Browse(string genre) //这里返回值 ...
- mysql 检查字符串是否包含子串
1.使用substring_index(src,target,index) 从src的开头查找第index个target.返回的substring为从src的开头到第num个target这段字符串.比 ...
- odoo中pos模块由于删除partner导致发生(你试图访问的单据已经删除)错误的解决方法
model.js文件中 push_order: function(order) { var self = this; if(order){ this.proxy.log('push_order',or ...
- Android alertdialog实现确认退出
package com.example.alertdialog; import android.os.Bundle; import android.app.Activity; import andro ...
- android 回调函数的使用
// activity 之间方法调用的桥梁 public class ActivityCallBridge { static ActivityCallBridge mBridge; private O ...
- golang json
1.Go语言的JSON 库 Go语言自带的JSON转换库为 encoding/json 1.1)其中把对象转换为JSON的方法(函数)为 json.Marshal(),其函数原型如下 func Mar ...
- B树索引
在SQL Server中,索引是一种增强式的存在,这意味着,即使没有索引,SQL Server仍然可以实现应有的功能.但索引可以在大多数情况下大大提升查询性能高.在OLAP中尤其明显,要完全理解索引的 ...
- 基于 php-redis 的redis操作
基于 php-redis 的redis操作 林涛 发表于:2016-5-13 12:12 分类:PHP 标签:php,php-redis,redis 203次 redis的操作很多的,下面的例子都是基 ...
- http协议简述
HTTP协议 客户端连上web 服务器后,若想获得 web 服务器中的某个 web 资源,需遵守一定的通讯格式, HTTP 协议用于定义客户端与 web 服务器通迅的格式. WEB浏览器与 WEB 服 ...