当前位置:网站首页>A system has n processes with a total of 7 resources. Each process needs 3 resources. What is the maximum number of N without deadlock? (analysis attached)
A system has n processes with a total of 7 resources. Each process needs 3 resources. What is the maximum number of N without deadlock? (analysis attached)
2022-04-21 08:42:00 【Wen Siyong】
3
Analysis of the answer :
Find the critical number of resources , Number of resources required per process -1, Then add it up to the number of critical resources m
Greater than m There will be no deadlock , Less than or equal to m It will lock up
process P1,P2,P3 The number of resources required is n1,n2,n3, Then the number of critical resources is (n1-1)+(n2-1)+(n3-1)
eg:
3 A process , Each process requires 5 A resource
Every process gets 4 A resource , That is, no extra resources can be reallocated to any one of them , Then there is a deadlock
If there is another redundant resource, it can be given to any process , Release after execution 5 A resource for others 4 Processes use , There will be no deadlock . At least (5-1)+(5-1)+(5-·1)+1=13 A resource , No deadlock
Go back to the original question :
N*(3-1)+1=7, Solution n=3
版权声明
本文为[Wen Siyong]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210841084573.html
边栏推荐
- PC微信机器人个人号接口api之实战分析微信同意好友call
- 51 单片机学习_1.3 LED流水灯
- Insert a new node after the linked list node
- ZABBIX 5.4 server installation
- Configure redis to start automatically on Linux
- 7.3 卷积神经网络 NIN
- 基于asp.net网上鲜花购物管理
- 【(强推)李宏毅2021/2022春机器学习课程】Unsupervised Learning - Linear Methods
- 2022年T电梯修理考题及在线模拟考试
- Configure multiple SSH keys
猜你喜欢

7.4 并行卷积神经网络 GoogleNet

Enter four integers in descending order

物联网智能网关工控串口数据透传WiFi模块的选型

一种带开关量的开口式电流互感器的应用

2022化工自动化控制仪表考试练习题及模拟考试

渗透实战-无回显Rce-thinkphp5-Getshell

曾经有望挑战苹果的魅族,如今靠为苹果用户提供配件而生存

输入四个整数按照从小到大的顺序排列

knn预测最小案例总结
![[arm assembly judgment] how to use assembly to judge the number of positive and negative numbers in an array?](/img/96/de72a6446ff1405697ff90369946ed.png)
[arm assembly judgment] how to use assembly to judge the number of positive and negative numbers in an array?
随机推荐
JVM——》CMS
Map Object WeakMap
基于asp.net网上鲜花购物管理
51 single chip microcomputer learning_ 1.3 LED water lamp
About deep learning drawing
[Nodejs]Nodejs基础补充(三)-this上下文对象
7.4 并行卷积神经网络 GoogleNet
ThinkPHP quick start (III)
What is paternity and diamond inheritance
渗透实战-挖掘某学校站点漏洞(APP漏洞)
电网企标B接口接入记录(二):资源上报
Idlestatehandler heartbeat detection to realize timeout disconnection
【论文阅读】【ICCV 2021】RPNet:Learning Inner-Group Relations on Point Clouds
逻辑回归几个重点
Insert a new node before the linked list node
7.3 卷积神经网络 NIN
线性回归api
图像的主题模型
Kotlin project cannot run after IntelliJ update
输入四个整数按照从小到大的顺序排列