当前位置:网站首页>Have you ever encountered a deadlock problem in MySQL? How did you solve it?
Have you ever encountered a deadlock problem in MySQL? How did you solve it?
2022-07-26 18:37:00 【Orange ꦿ. ๓】
The necessary conditions for deadlock are 4 individual :
mutual exclusion : Over a period of time , A certain resource of the computer can only be occupied by one process . here , If another process requests the resource , We have to wait
The condition of indivisibility : The resources obtained by a process are used up before , It can't be taken away by other processes , It can only be released actively by the process that obtains the resource
Request and hold conditions : The process has obtained at least one resource , And ask for other resources , But the requested resource is already occupied by another process , At this point, the requested process will be blocked , And will not release their own resources
Loop wait condition : Processes in the system wait for each other , At the same time, the resources occupied by each process will be requested by the next process . For example, there are processes A、 process B And processes C Three processes , process A The requested resource is by the process B Occupy , process B The requested resource is by the process C Occupy , process C The requested resource is by the process A Occupy , So a circular waiting condition is formed , As shown in the figure below :

Deadlock prevention : The most direct way to deal with deadlock is to destroy the 4 One or more of the necessary conditions , To prevent deadlock .
Avoid deadlock : During the allocation of system resources , Use a strategy or method to prevent the system from entering an unsafe state , So as to avoid deadlock .
Detection of deadlock : This method allows the system to deadlock during operation , But it can detect the occurrence of deadlock , And take appropriate measures to clear the deadlock .
Deadlock Relieving : When deadlock is detected , Adopt appropriate strategies and methods to free the process from deadlock .
边栏推荐
- 【在 Kotlin 中添加条件行为】
- MPLS experiment
- Real passwords do not match during synchronization
- Mpc5744p burning to 98% can not continue to download the program
- 云服务器mySQL提示报错
- Sign up now | cloud native technology exchange meetup Guangzhou station has been opened, and I will meet you on August 6!
- NFT数字藏品系统开发:上线即售罄,网民“秒杀”数字藏品
- NFT数字藏品系统开发:“中国旅游日”山西首次发布古建筑数字藏品
- Explain in detail the implementation of grpc client long connection mechanism
- Netease game R & D Engineer Intern (client side)
猜你喜欢

SSM练习第五天

offer-集合(1)

Offer set (1)

455. 分发饼干【双指针 ++i、++j】

Leetcode 50 day question brushing plan (day 4 - longest palindrome substring 14.00-16:20)

Linked list - the penultimate K nodes

Become a test / development programmer, Xiao Zhang: reality is coming

Download and configuration of irrklang audio library

PS_ 2_ layer

Sign up now | cloud native technology exchange meetup Guangzhou station has been opened, and I will meet you on August 6!
随机推荐
Test cases of common functions
链表-倒数最后k个结点
链表-两个链表的第一个公共结点
14. Gradient detection, random initialization, neural network Summary
被控专利授权费过高!美法院判决高通违反反垄断法:高通股价大跌10.86%!
How the test team conducts QA specification
剑指offer 正则表达式匹配
Real passwords do not match during synchronization
Linked list - reverse linked list
Operation: skillfully use MySQL master-slave replication delay to save erroneously deleted data
数据库索引的原理,为什么要用 B+树,为什么不用二叉树?
继续卷技术 埋头苦学,越学越会
链表-反转链表
Explain in detail the implementation of grpc client long connection mechanism
SSM练习第五天
455. Distribute cookies [double pointer ++i, ++j]
Download and configuration of irrklang audio library
Maximum sum of continuous subarray of sword finger offer (2)
Visual VM positioning oom, fullgc usage
The faith of circle justice