原文: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

最新文章

  1. SVN 图标消失
  2. REDHAT一总复习1 记录systemd日志条目 rsyslogd配置记录日志指令
  3. python中的monkey-patching
  4. js中各种宽高
  5. 跟我一起学WCF(8)——WCF中Session、实例管理详解
  6. HDR Defered Shading (using MRT)
  7. JS中的DOM与BOM
  8. group by应用
  9. HDU5339
  10. 什么是野指针?(What is a wild pointer?)
  11. EDStarRating(IOS星级评定)
  12. 用Pyton玩转数据练习题---第二周
  13. 实现响应式——Bootstrap的删格系统详解
  14. Leetcode题解(28)
  15. SpringBoot CGLIB AOP解决Spring事务,对象调用自己方法事务失效.
  16. 关于HC04超声波模块测距的思考(51版)
  17. JAVA之旅(十三)——线程的安全性,synchronized关键字,多线程同步代码块,同步函数,同步函数的锁是this
  18. c++stack类的用法
  19. Swoole 异步mysql使用
  20. org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误几种解决方案

热门文章

  1. BestRW团队项目创意以及NABCD
  2. PHP面向对象(OOP)编程入门教程————如何实例化对象?
  3. nodejs学习笔记<一>安装及环境搭建
  4. Java中HashMap案例
  5. 5.7 C和C++的关系
  6. Android aidl Binder框架浅析
  7. Could not obtain connection metadata
  8. aspx后缀映射成html
  9. printf();
  10. OpenCV C++ 计算文件夹中对象文件数目及批量处理后保存到txt文件