若一个单处理器的计算机系统中同时存在3个并发进程,则同一时刻允许占用处理器的进程数( );如果这3个进程都要求使用2个互斥资源R,那么系统不产生死锁的最少的R 资源数为(请作答此空)个。
2023-09-01
A. 3
B. 4
C. 5
D. 6
参考答案:B
B. 4
C. 5
D. 6
参考答案:B
本题的正确选项为B。对于选项A,在操作系统为每个进程分配1个资源R后,若这3个进程再分别请求1个资源R时,系统已无可供分配的资源R,则这3个进程由于请求的资源R得不到满足而死锁。如果选择选项B,那么操作系统为每个进程分配1个资源R后,系统还有1个可供分配的资源R,能满足其中的1个进程的资源要求,它运行完毕释放占有的资源R后,可以使其他进程也能得到所需的资源R并运行完毕。
![]( //img1.runjiapp.com/duoteimg/tiku/images/pc/questionBank/main-list-title-icon.png)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_42.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_86.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_83.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_55.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_39.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_69.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_47.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_11.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_94.jpg)
热门标签