原文: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. SAP供应商和客户的创建

    进来遇到一个创建供应商的需求,由于在系统中关于供应商和客户的创建比较特殊,且没有相关函数进行创建, 找到一个类和方法来创建,类名:VMD_EI_API  方法名:MAINTAIN_DIRECT_INP ...

  2. Doragon Kuesuto 1.6

    /* * <<D Q>> * * Author xkfx<wyzxk_fx@163.com> * * 游戏规则:利用适当的决策,在13回合内击杀恶龙取得胜利. * ...

  3. zend studio12.5破解方法

    其实,很简单,找到zend studio 安装目录,G:\zend studio\plugins,把文件com.zend.verifier_12.5.1.v20150514-2003.jar替换成压缩 ...

  4. epoll的lt和et模式的实验

    针对epoll api的两种触发模式,lt和et,仿照一些例子写了代码进行实验. #include <sys/types.h> #include <sys/socket.h> ...

  5. Android Glide+CircleImageView实现加载圆形图片列表

    需求:要在列表中实现圆形图片的显示,控件可能和加载库会存在冲突 先上代码,至于其中源码,以后有空再分析 MainActivity public class MainActivity extends A ...

  6. 这个算asp.net的一个bug吗?

    asp.net设置按钮Enabled="false"后OnClientClick中添加的验证脚本消失了 下面的确可以 <asp:Button ID="btnRegi ...

  7. gradle资料

    <Gradle用户教程>中文版 · GitBookhttps://www.gitbook.com/book/yeetrack/-gradle-user-guide-chinese/deta ...

  8. 如何使用 declare-styleable

    如何使用 declare-styleable 在创建 xml 到 objectName/res/values/ 命名为 attrs.xml 编辑文件内容为(示例)<?xml version=&q ...

  9. java 集合4(迭代器)

    迭代器使用要注意的问题: 1.迭代器在遍历元素的时候注意事项: 在迭代器迭代元素的过程中,不准使用集合对象改变集合中的元素个数, 如果要添加或删除要用迭代器的方法. 2.如果使用类集合对象改变集合中的 ...

  10. rand()和srand()GetTickCount函数用法

    标准库<cstdlib>(被包含于<iostream>中)提供两个帮助生成伪随机数的函数: 函数一:int rand(void):从srand (seed)中指定的seed开始 ...