当前位置:网站首页>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 )
边栏推荐
- K210学习笔记(四) K210同时运行多个模型
- Deeply convinced plan X - network protocol basic DNS
- Huawei cloud modelarts text classification - takeout comments
- Image editor for their AutoLayout environment
- Poj 3237 Tree (Tree Chain Split)
- Installation of VMware Workstation
- Codeforces 12D ball tree array simulation 3 sorting elements
- Ethereum ETH的奖励机制
- Emotional analysis of wechat chat records on Valentine's day based on Text Mining
- Official clarification statement of Jihu company
猜你喜欢
Sentinel production environment practice (I)
Kingbasees v8r3 cluster maintenance case -- online addition of standby database management node
Getting started with microservices (resttemplate, Eureka, Nacos, feign, gateway)
R language learning notes
Implementation technology of recovery
从零开始实现lmax-Disruptor队列(四)多线程生产者MultiProducerSequencer原理解析
Interprocess communication in the "Chris Richardson microservice series" microservice architecture
Lightweight dynamic monitorable thread pool based on configuration center - dynamictp
怎么利用Tensorflow2进行猫狗分类识别
Summarize the reasons for 2XX, 3xx, 4xx, 5xx status codes
随机推荐
How to add new fields to mongodb with code (all)
Exercise 1 simple training of R language drawing
Oracle checkpoint queue - Analysis of the principle of instance crash recovery
Image editor for their AutoLayout environment
Pointer parameter passing vs reference parameter passing vs value parameter passing
如何组织一场实战攻防演练
Detailed explanation of memset() function usage
ESP32
Some common processing problems of structural equation model Amos software
DBeaver同时执行多条insert into报错处理
How can Huawei online match improve the success rate of player matching
Poj3414 extensive search
Daily question brushing record (XIV)
Cold violence -- another perspective of objective function setting
Evolution of large website architecture and knowledge system
Scenario interview: ten questions and ten answers about distributed locks
Tips for using SecureCRT
Summary of data analysis steps
854. 相似度为 K 的字符串 BFS
MySQL连接断开报错MySQLdb._exceptions.OperationalError 4031, The client was disconnected by the server