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
Detailed Answer:
1. Mutex use (Resource exclusive)
A resource can be used only for one process at a time
2. Not to be usurped (inalienable)
Resource applicants cannot forcibly seize resources from the resource holders, and resources can only be released voluntarily by the possessor
3. Request and maintain (partial allocation, possession application)
A process that is applying new resources while maintaining ownership of the original resources (this is the dynamic application, dynamic allocation)
4. Cyclic waiting
There is a process waiting queue
{P1, P2, ..., Pn},
Wherein 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?