Added a point in handling deadlock (#19997)

This commit is contained in:
Ankush Soni
2018-10-27 18:46:27 +05:30
committed by Tom
parent 66f52c03bf
commit c28550252c

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>. - **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 ### 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. - Ensure that the system will never enter a deadlock state.
- Allow the system to enter a deadlock state and then recover. - 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**. - Ignore the problem and pretend that deadlocks never occur in the system; **used by most operating systems, including UNIX**.
@@ -48,4 +49,4 @@ Deadlock can arise if four conditions hold simultaneously.
#### More information : #### More information :
- [Deadlock](https://en.wikipedia.org/wiki/Deadlock) - [Deadlock](https://en.wikipedia.org/wiki/Deadlock)
- [Operating System | Process Management | Deadlock Introduction](https://www.geeksforgeeks.org/operating-system-process-management-deadlock-introduction/) - [Operating System | Process Management | Deadlock Introduction](https://www.geeksforgeeks.org/operating-system-process-management-deadlock-introduction/)