当前位置:网站首页>Visual Analysis of DeadLock
Visual Analysis of DeadLock
2022-08-02 08:05:00 【papaofdoudou】
Everyone may have seen traffic jams. A large number of cars are fighting for the right to exercise the traffic intersections, causing traffic jams, or because the vehicles break down or two cars collide, causing traffic jams.In this case, all cars are stopped and no one can move forward. This is a deadlock.
Two people crossing a single-plank bridge is an example of a deadlock:

Or if a busy intersection + traffic is paralyzed, look at the pictures and talk, which direction is the first traffic jam?

The situation in the picture below is not a deadlock. Because a vehicle irresponsibly occupies the right of way (which can be considered as a resource), the following vehicles are waiting, but this waiting state can be changed, as long as the whiteAs the vehicle moves on, the system status is updated.
There are many exclusive resources in the operating system. Semaphores and mutual exclusion locks are tools to provide multi-threaded resource protection and synchronization in RTOS or Linux systems. If used correctly, our programs will run safely, stably and reliably. However,If used incorrectly, it can also cause deadlocks, which in operating systems are when a group of threads are blocked, waiting for a condition that will never be true.After entering the deadlock, the status of all parties involved in the deadlock
边栏推荐
猜你喜欢

OC-error prompt

Probability Theory and Mathematical Statistics

Understand the Chisel language. 30. Chisel advanced communication state machine (2) - FSMD: Take Popcount as an example

【CV】OpenVINO installation tutorial

Mysql报错2003 解决办法 Can‘t connect to MySQL server on ‘localhost‘ (10061)

MySQL-锁机制

regular expression

ROS file system and related commands

MySQL - low level settings

MPLS和BGP的综合实验
随机推荐
PLSQL Developer安装和配置
静态路由综合实验
爬虫 视频爬取工具you-get
MySQL-FlinkCDC-Hudi enters the lake in real time
MGRE综合实验
PanGu-Coder: A function-level code generation model
LeetCode 2312. Sell Wood Blocks
Splunk Field Caculated 计算字段
MySQL-数据库事务详解
有点奇怪!访问目的网址,主机能容器却不行
Conditional constructor ~wapper
FormData上传二进制文件、对象、对象数组
LeetCode刷题(7)
OC-NSDictionary
MySQL-多版本并发控制
Thesis understanding: "Cross-Scale Residual Network: A GeneralFramework for Image Super-Resolution, Denoising, and "
hdu1752 copy
HCIP 第九天
Compact格式下MySQL的数据如何存储到磁盘
有关 sql中的 concat()函数问题,如何拼接