Friday, January 27, 2012

Deadlock


Deadlock is a situation in which the processes waits for the other resource which is occupied by another process in a loop for example take processes P1 and P2 and resources R1 and R2 in the deadlock condition

        P1 -R1 waits for R2
        P2 -R2 waits for R1 

so both processes waits for the other resource to get free for their complete operation.
In such cases - One can avoid deadlocks by following methods

1) Prevention
2) Detection
3) Avoidance
4) Recovery

No comments:

Post a Comment