Skip to main content

Deadlock in operating system-computer world

  Deadlock in operating system-computer world

Deadlock : 

In a multi-programming environment, many process may complete for a minute number of resources. A process make a request for a resource and if the resource is not available at that time, the process enter In a waiting state. A waiting state process is never again-able to change state because the resource it has requested is held by other waiting process. This situation is called deadlock. So we can say that a process is said to be deadlock when it is waiting for an event or resources which will never occurs. 

 so we can say that in this situation none of the process gets executed  since the resource it needs, is held by some other process which is also waits for some other resource to be released. 

Let's assume that there are three process P1, P2, p3 and three different resources R1, R2 and R3. R1 is assigned to p1, R2 is assigned to P2 and R3 is assigned to P3. 

 After sometime P1 demands for R1 which is being used by  P2. P1 hold it's execution  because it cannot complete without R2. P2 also demands for R3 which is being used by P3. P2 also hold its execution because it cannot continue without R3. P3 also demand for R1 which is being used by P1 therefore P3 also stop its execution. In this scenario none of the process is progressing and they are all  waiting for the resource and the computer become unresponsive since all the process got blocked this situation is known as deadlock situation.


Comments

Post a Comment

Popular posts from this blog