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