博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Difference between Linearizability and Serializability
阅读量:4968 次
发布时间:2019-06-12

本文共 1143 字,大约阅读时间需要 3 分钟。

原文:

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:

enter image description here

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)

参考链接:

转载于:https://www.cnblogs.com/hanhuilee/p/5221302.html

你可能感兴趣的文章
Git使用总结(廖雪峰git)
查看>>
BZOJ 1898: [Zjoi2004]Swamp 沼泽鳄鱼( dp + 矩阵快速幂 )
查看>>
vue-swiper 基于Vue2.0开发 轻量、高性能轮播插件
查看>>
ORACLE ORDER BY用法总结
查看>>
Html学习_style属性应用
查看>>
链表函数(建立,删除重复元素,排序,输出)—— 链表的有序集合
查看>>
js闭包
查看>>
聚类算法之BIRCH(Java实现)
查看>>
青蛙学Linux—Zabbix Web使用之添加一台主机
查看>>
Pod资源管理
查看>>
Metro Style App :Framwork与WinRT(一)
查看>>
[bzoj3209]花神的数论题
查看>>
字符串创建运算符#
查看>>
combobox获取值
查看>>
SQL 学习笔记(一)联表查询
查看>>
E-PUCK机器人-标准固件
查看>>
lintcode:数飞机
查看>>
虚拟路径和物理路径 实例
查看>>
网上选课系统-进度
查看>>
fckeditor-修改上传路径等问题
查看>>