当前位置:网站首页>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 )
边栏推荐
- Ad637 notes d'utilisation
- Interprocess communication in the "Chris Richardson microservice series" microservice architecture
- 每日刷题记录 (十四)
- MMAP学习
- Making global exception handling classes with aspect
- SQL common syntax records
- "Grain mall" -- Summary and induction
- Decorator learning 01
- MATLAB | App Designer·我用MATLAB制作了一款LATEX公式实时编辑器
- Environment configuration problem record
猜你喜欢

Reptile practice

Summarize the reasons for 2XX, 3xx, 4xx, 5xx status codes

华为联机对战如何提升玩家匹配成功几率

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

R language learning notes

Exercise 1 simple training of R language drawing

Emotional analysis of wechat chat records on Valentine's day based on Text Mining

Shell script, awk condition judgment and logic comparison &||

ICMP 介绍

Sorting out the problems encountered in MySQL built by pycharm connecting virtual machines
随机推荐
Getting started with microservices (resttemplate, Eureka, Nacos, feign, gateway)
Code bug correction, char is converted to int high-order symbol extension, resulting in changes in positivity and negativity and values. Int num = (int) (unsigned int) a, which will occur in older com
Summarize the reasons for 2XX, 3xx, 4xx, 5xx status codes
oracle 控制文件的多路复用
Shell script, awk condition judgment and logic comparison &||
A number of ventilator giants' products have been recalled recently, and the ventilator market is still in incremental competition
How to use tensorflow2 for cat and dog classification and recognition
Some common processing problems of structural equation model Amos software
Yolov5 training custom data set (pycharm ultra detailed version)
How to organize an actual attack and defense drill
从零开始实现lmax-Disruptor队列(四)多线程生产者MultiProducerSequencer原理解析
Chap2 steps into the palace of R language
Kingbasees v8r3 data security case - audit record clearing case
Create a virtual machine on VMware (system not installed)
SecureCRT使用提示
递归查询多级菜单数据
"Grain mall" -- Summary and induction
Gcc9.5 offline installation
Type of fault
The American Championship is about to start. Are you ready?