原文:http://stackoverflow.com/questions/8200015/what-is-the-difference-between-serializability-and-linearizability

It was hard to find information about this subject. However, At some point I found a statement that explained it clearly:

  • Linearizability gives isolation at the level of operations, while Serializability gives isolation at the level of transactions.

As an example:

Here, A, B and C are three different transactions running at the same time. r(varname) means that the current transaction is accessing the value inside varname, and w(varname) means that the current transaction is writing a certain value in varname.

Now, to create a linearized history of these events, we have to make sure that no two operations are happening at the same time. An operation that has started while another operation already started should appear behind the first operation.

In this case:

Log1: A.r(x), B.r(X), B.r(Y), A.w(X), C.r(Y)

To create a Serialized history of these events, one has to separate all the operations of the transactions A, B and C so there are no interleaved operations from other transactions.

From our example this could result in:

Log2: A.r(x), A.w(x), B.r(X), B.r(Y), C.r(Y) 

参考链接:http://en.wikipedia.org/wiki/Serializability

Difference between Linearizability and Serializability的更多相关文章

  1. You Can Do Research Too

    You Can Do Research Too I was recently discussing gatekeeping and the process of getting started in ...

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

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

  3. Java 堆内存与栈内存异同(Java Heap Memory vs Stack Memory Difference)

    --reference Java Heap Memory vs Stack Memory Difference 在数据结构中,堆和栈可以说是两种最基础的数据结构,而Java中的栈内存空间和堆内存空间有 ...

  4. What's the difference between a stub and mock?

    I believe the biggest distinction is that a stub you have already written with predetermined behavio ...

  5. [转载]Difference between <context:annotation-config> vs <context:component-scan>

    在国外看到详细的说明一篇,非常浅显透彻.转给国内的筒子们:-) 原文标题: Spring中的<context:annotation-config>与<context:componen ...

  6. What's the difference between <b> and <strong>, <i> and <em> in HTML/XHTML? When should you use each?

    ref:http://stackoverflow.com/questions/271743/whats-the-difference-between-b-and-strong-i-and-em The ...

  7. difference between forward and sendredirect

    Difference between SendRedirect and forward is one of classical interview questions asked during jav ...

  8. Add Digits, Maximum Depth of BinaryTree, Search for a Range, Single Number,Find the Difference

    最近做的题记录下. 258. Add Digits Given a non-negative integer num, repeatedly add all its digits until the ...

  9. MySQL: @variable vs. variable. Whats the difference?

    MySQL: @variable vs. variable. Whats the difference?   up vote351down votefavorite 121 In another qu ...

随机推荐

  1. javascript获取类元素

    代码测试是ie5+: 原生javascript中筛选出含有指定类的元素: 思想:在指定范围里把所有的元素筛选出来,然后把里面的每个元素都遍历找出它们含有的所有类,然后逐个元素遍历它们各自的类,如果指定 ...

  2. CentOS6.4_常用命令

    1. 查看本机是否安装了 xxx软件,以及 xxx软件 的版本信息等: rpm -qa |grep  xxx(xxx代表软件名) 2. rpm -ivh 要安装的rpm文件包 3. 不care依赖项的 ...

  3. HDU5845 Best Division

    递归写法,好久不写很容易就gg了... dp[i]=max(dp[j])+1,并且s[i]XORs[j]<=x  01字典树优化一下转移. #include <bits/stdc++.h& ...

  4. 使用otl,报错:mysql Commands out of sync; you can't run this command now

    1.代码如下: void TestCache(otl_connect& otlConn) { try { ] = {}; sprintf(sql,"call test1(1)&quo ...

  5. 2015苹果WWDC开发者大会

    2015苹果WWDC开发者大会 (1)本届主题为“the epicenter of change(变革的中心)” (2)iOS 9.OS X.watchOS三款重要系统更新以及其他服务 (3)iOS ...

  6. 转:对TCP/IP网络协议的深入浅出归纳

    转自:http://blog.jobbole.com/74795/ 前段时间做了一个开发,涉及到网络编程,开发过程比较顺利,但任务完成后始终觉得有一些疑惑.主要是因为对网络协议不太熟悉,对一些概念也没 ...

  7. 使用git命令提交远程github仓库的时候提示"rejected"(拒绝)解决办法

    今天使用在自己笔记本本地磁盘上使用Git命令行执行"git push"然后输入github的用户名和密码之后,报如下错误: ![rejected] master->maste ...

  8. LF will be replaced by CRLF in git add

    git add 出现这样的提示: LF will be replaced by CRLF in qinqiu.txt. 这个时候要: $ rm -rf .git  // 删除.git $ git co ...

  9. China Brain Project: Basic Neuroscience, Brain Diseases, and Brain-Inspired Computing

    日前,中国科学院神经科学研究所.中国科学院脑科学与智能技术卓越创新中心.香港科技大学生命科学部和分子神经科学国家重点实验室.中国科技大学自动化研究所在 Cell 上联合发表了一篇概述论文<Chi ...

  10. xcode ___gxx_personality_v0" 编译错误

    xcode ___gxx_personality_v0" 编译错误 Undefined symbols for architecture i386: "___gxx_persona ...