Deadlock



Deadlock



https://media.geeksforgeeks.org/wp-content/cdn-uploads/gq/2015/06/deadlock.png

                                                 from geeks for geeks
In a multiprogramming system a number of process compete for limitted number of resources and if a resource is not avilable at that intance then process enter into waiting state.

If a process unable to change its waiting state indefinitely because the resources by it are helds by another waiting process then system is said to be in deadlock.

System model:
  • Every process will request for the resources.
  • If entertained this process will use the resource.
  • Process must be release the resorce after use. 
Sanchit Sir video tutorial


Necessary Condition Of Deadlock:

Mutual Exclusion:
At  least one resource type in the system which can be used in non-shared mode that is mutual exclusion(one-at a time/one by one).
Ex- Printer

Hold & Print: 
A process is currently helding  at least one resource and requesting additionnal resources which are being held  by others process.

No Pre-emption:
A resoure can not be pre-empted from a process by any other process resources can releasedoly voluntarvoluntary  by the process holding it.

Circular Wait:
Each process must be waiting for resource which is being held by another process, which in turn is waiting for the first process to release the resource.

sanchit sir video tutorial

Comments

Popular Posts