Added a point in handling deadlock (#19997)

pull/30341/head
Ankush Soni 2018-10-27 18:46:27 +05:30 committed by Tom
parent 66f52c03bf
commit c28550252c
1 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@ Deadlock can arise if four conditions hold simultaneously.
- **Circular wait** : there exists a set { P<sub>0</sub>, P<sub>1</sub>, …, P<sub>0</sub> } of waiting processes such that P<sub>0</sub> is waiting for a resource that is held by P<sub>1</sub>, P<sub>1</sub> is waiting for a resource that is held by P<sub>2</sub>, …, P<sub>n 1</sub> is waiting for a resource that is held by P<sub>n</sub>, and P<sub>0</sub> is waiting for a resource that is held by P<sub>0</sub>.
### Methods for Handling Deadlocks
- Put the system in a situation where the deadlock can be avoided, i.e. Deadlock Avoidance.
- Ensure that the system will never enter a deadlock state.
- Allow the system to enter a deadlock state and then recover.
- Ignore the problem and pretend that deadlocks never occur in the system; **used by most operating systems, including UNIX**.