当前位置:网站首页>Blocking of concurrency control
Blocking of concurrency control
2022-07-05 21:59:00 【Short section senior】
What is blockade
Blockade is business T On a data object ( Such as table 、 Records, etc. ) Before the operation , Make a request to the system first , Lock it
After lock transaction T It has certain control over the data object , In the transaction T Before releasing its lock , Other transactions cannot update this data object .
Blocking is a very important technology to realize concurrency control
Basic blockade types
What kind of control a transaction has after locking a data object is determined by the type of blocking .
Basic blockade types
Exclusive lock (Exclusive Locks, Short for X lock )
Exclusive lock is also called write lock
If business T For data objects A add X lock , Only T Read and modify A, Nothing else can be done to A Add any type of lock , until T Release A The lock on the
Make sure other things are in T Release A The lock on can't be read or modified before A
Shared lock (Share Locks, Short for S lock )
Shared locks are also called read locks
If business T For data objects A add S lock , The transaction T You can read A But it can't be modified A, Other things can only be done to A Add S lock , Instead of X lock , until T Release A Upper S lock
Make sure other transactions are readable A, But in T Release A Upper S You can't do it before you lock it A Make any changes
Compatibility matrix of lock
Y=Yes, Compatible requests
N=No, Incompatible requests
In the compatibility matrix of locks :
The leftmost column represents transactions T1 The type of lock on the acquired data object , The horizontal line indicates that it is not locked .
The top line represents another transaction T2 Blocking request for the same data object .
T2 Whether the blocking request can be satisfied is used in the matrix Y and N Express
Y Presentation transaction T2 The blockade requirements and T1 Lock held , The blocking request can satisfy
N Express T2 Your blocking request is related to T1 Lock already held conflicts ,T2 's request was rejected
Welcome to join me for wechat exchange and discussion ( Please note csdn Add )
边栏推荐
- MATLAB | App Designer·我用MATLAB制作了一款LATEX公式实时编辑器
- 总结出现2xx、3xx、4xx、5xx状态码的原因
- How to view Apache log4j 2 remote code execution vulnerability?
- 华为云ModelArts文本分类–外卖评论
- oracle 控制文件的多路复用
- Advantages and disadvantages of the "Chris Richardson microservice series" microservice architecture
- Matlab | app designer · I used Matlab to make a real-time editor of latex formula
- 2.2 basic grammar of R language
- Net small and medium-sized enterprise project development framework series (one)
- Sorting out the problems encountered in MySQL built by pycharm connecting virtual machines
猜你喜欢
使用Aspect制作全局异常处理类
Advantages and disadvantages of the "Chris Richardson microservice series" microservice architecture
Li Kou ----- the maximum profit of operating Ferris wheel
MMAP
怎么利用Tensorflow2进行猫狗分类识别
Ad637 notes d'utilisation
KingbaseES V8R3集群维护案例之---在线添加备库管理节点
MATLAB | App Designer·我用MATLAB制作了一款LATEX公式实时编辑器
2.2 basic grammar of R language
matlab绘制hsv色轮图
随机推荐
kingbaseES V8R3数据安全案例之---审计记录清除案例
matlab绘制hsv色轮图
Four components of logger
Shell script, awk uses if, for process control
总结出现2xx、3xx、4xx、5xx状态码的原因
华为游戏多媒体服务调用屏蔽指定玩家语音方法,返回错误码3010
Robot framework setting variables
2.2.3 output of documents
How to add new fields to mongodb with code (all)
MMAP
Environment configuration problem record
Deeply convinced plan X - network protocol basic DNS
Sitge joined the opengauss open source community to jointly promote the ecological development of the database industry
Getting started with microservices (resttemplate, Eureka, Nacos, feign, gateway)
Recursive query of multi-level menu data
Image editor for their AutoLayout environment
Chap2 steps into the palace of R language
如何组织一场实战攻防演练
Daily question brushing record (XIV)
Regular expressions and re Libraries