Q: Which of the following are the necessary conditions for deadlock occurrence?
A. Mutually exclusive conditions
B. Request and hold
C. Non-deprivation
D, cyclic waiting
Specific answers:
1. Mutually exclusive use (resource monopoly)
A resource can only be used for one process at a time
2. Not to be usurped (inalienable)
Resource applicants cannot forcibly seize resources from the resource holders, resources can only be released voluntarily by the possessor
3. Request and maintain (partial allocation, possession application)
A process maintains the possession of the original resource at the same time as the application of a new resource (only this is the dynamic application, dynamic allocation)
4. Cyclic waiting
There is a process waiting queue
{P1, P2, ..., Pn},
Among them P1 waits for P2 to occupy the resources, P2 waits for the P3 to occupy the resources, ..., PN waits for the P1 to occupy the resources, forms a process waits the loop
Answer: ABCD
The C language Pen question selection 3---deadlock occurrence necessary condition is?