当前位置:网站首页>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 )
边栏推荐
- NET中小型企业项目开发框架系列(一个)
- Image editor for their AutoLayout environment
- Hysbz 2243 staining (tree chain splitting)
- 总结出现2xx、3xx、4xx、5xx状态码的原因
- MySQL disconnection reports an error MySQL ldb_ exceptions. OperationalError 4031, The client was disconnected by the server
- Xlrd common operations
- Shell script, awk condition judgment and logic comparison &||
- The Blue Bridge Cup web application development simulation competition is open for the first time! Contestants fast forward!
- 使用Aspect制作全局异常处理类
- Lightweight dynamic monitorable thread pool based on configuration center - dynamictp
猜你喜欢
Lightweight dynamic monitorable thread pool based on configuration center - dynamictp
2.2.3 output of documents
Kingbasees v8r3 cluster maintenance case -- online addition of standby database management node
Exercise 1 simple training of R language drawing
每日刷题记录 (十四)
Drawing HSV color wheel with MATLAB
Experienced inductance manufacturers tell you what makes the inductance noisy. Inductance noise is a common inductance fault. If the used inductance makes noise, you don't have to worry. You just need
Huawei cloud modelarts text classification - takeout comments
AD637 usage notes
Shell script, awk condition judgment and logic comparison &||
随机推荐
Tips for using SecureCRT
Four components of logger
database mirroring
The Blue Bridge Cup web application development simulation competition is open for the first time! Contestants fast forward!
How can Huawei online match improve the success rate of player matching
Installation of VMware Workstation
poj 3237 Tree(树链拆分)
Kingbasees v8r3 cluster maintenance case -- online addition of standby database management node
Overview of database recovery
KingbaseES V8R3集群维护案例之---在线添加备库管理节点
如何组织一场实战攻防演练
datagrid直接编辑保存“设计缺陷”
Ethereum ETH的奖励机制
Learning notes of statistical learning methods -- Chapter 1 Introduction to statistical learning methods
DBeaver同时执行多条insert into报错处理
Sentinel production environment practice (I)
怎么利用Tensorflow2进行猫狗分类识别
Oracle HugePages没有被使用导致服务器很卡的解决方法
C language knowledge points link
Daily question brushing record (XIV)