当前位置:网站首页>Serializability of concurrent scheduling
Serializability of concurrent scheduling
2022-07-05 21:59:00 【Short section senior】
Different scheduling of concurrent transactions by database management system may produce different results
Serial scheduling is correct
It is also true that the execution result is equivalent to serial scheduling , It is called serializable scheduling
Serializable scheduling
Serializable (Serializable) Dispatch
Concurrent execution of multiple transactions is correct , If and only if the result is the same as when these transactions are executed serially in a certain order
Serializability (Serializability)
It is the criterion for the correct scheduling of concurrent transactions
A given concurrent schedule , If and only if it is serializable , I think it's the right scheduling
[ example 11.2] Now there are two transactions , The following operations are included respectively :
Business T1: read B;A=B+1; Write back to A
Business T2: read A;B=A+1; Write back to B
Different scheduling strategies for these two transactions are given
Serial scheduling , Correct scheduling 
hypothesis A、B The initial values of are 2.
Press T1→T2 The sequence execution result is A=3,B=4
Serial scheduling policy , Correct scheduling 
hypothesis A、B The initial values of are 2.
T2→T1 The sequence execution result is B=3,A=4
Serial scheduling policy , Correct scheduling
Non serializable scheduling , Wrong scheduling 
Execution results and (a)、(b) The results are all different
It's the wrong scheduling
Serializable scheduling , Correct scheduling 
Execution results and serial scheduling (a) The execution results are the same
Is the right scheduling
Conflicts can be scheduled serially
Conflicts can be serialized
A more stringent condition than serializability
The scheduler in the commercial system adopts
Conflicting operations : It refers to the reading and writing operations of different transactions on the same data :
Ri(x) And Wj(x) /* Business Ti read x,Tj Write x, among i≠j*/
Wi(x) And Wj(x) /* Business Ti Write x,Tj Write x, among i≠j*/
Other operations are non conflicting operations
It can't be exchanged (Swap) The action of :
Two operations of the same transaction
Conflicting operations of different transactions
A dispatch Sc In the case of keeping the order of conflicting operations unchanged , Get another schedule by exchanging the order of two non conflicting transactions Sc’, If Sc’ It's serial , Call scheduling Sc Conflict serializable scheduling
If a scheduling conflict is serializable , Then it must be serializable scheduling
This method can be used to determine whether a schedule is conflict serializable
[ example 11.3] There is a dispatch today

Sc2 Equivalent to a serial scheduling T1,T2. therefore Sc1 Conflict serializable scheduling
Conflict serializable scheduling is a sufficient condition for serializable scheduling , It's not necessary . There is also serializable scheduling that does not meet the conflict serializability condition .
[ example 11.4] Yes 3 One transaction T1=W1(Y)W1(X),T2=W2(Y)W2(X),T3=W3(X)
Dispatch L1=W1(Y)W1(X)W2(Y)W2(X) W3(X) Is a serial scheduler .
Dispatch L2=W1(Y)W2(Y)W2(X)W1(X)W3(X) Does not satisfy conflict serializability . But scheduling L2 It's serializable , because L2 Execution results and scheduling L1 identical ,Y All the values of are equal to T2 Value ,X All the values of are equal to T3 Value
Welcome to join me for wechat exchange and discussion ( Please note csdn Add )
边栏推荐
- one hundred and twenty-three thousand four hundred and fifty-six
- K210学习笔记(四) K210同时运行多个模型
- HDU 4391 paint the wall segment tree (water
- Exercise 1 simple training of R language drawing
- AD637使用筆記
- 1.2 download and installation of the help software rstudio
- KingbaseES V8R3集群维护案例之---在线添加备库管理节点
- Reptile practice
- Oracle检查点队列–实例崩溃恢复原理剖析
- ESP32
猜你喜欢

MMAP learning

Overview of database recovery

每日刷题记录 (十四)

A number of ventilator giants' products have been recalled recently, and the ventilator market is still in incremental competition

Recursive query of multi-level menu data

华为云ModelArts文本分类–外卖评论

从零开始实现lmax-Disruptor队列(四)多线程生产者MultiProducerSequencer原理解析

MMAP

ICMP introduction

K210 learning notes (IV) k210 runs multiple models at the same time
随机推荐
Huawei fast game failed to call the login interface, and returned error code -1
【愚公系列】2022年7月 Go教学课程 003-IDE的安装和基本使用
Interprocess communication in the "Chris Richardson microservice series" microservice architecture
ICMP 介绍
How to add new fields to mongodb with code (all)
AD637使用笔记
PIP install beatifulsoup4 installation failed
递归查询多级菜单数据
Oracle检查点队列–实例崩溃恢复原理剖析
2.2 basic grammar of R language
初级软件测试必问面试题
Summary of El and JSTL precautions
华为游戏多媒体调用切换房间方法出现异常Internal system error. Reason:90000017
Overview of database recovery
Reptile practice
CRM creates its own custom report based on fetch
AD637 usage notes
多家呼吸机巨头产品近期被一级召回 呼吸机市场仍在增量竞争
SQL knowledge leak detection
Yolov5 training custom data set (pycharm ultra detailed version)