ADS

Sunday, 3 June 2018

What is deadlock in Operating System

What is deadlock:


¡Deadlock is a situation in which all the processes in waiting status that is wait for a resource that is held by another process.




Deadlock situation:


System Model:


In normal execution a resource must be utilized in following order.

.Request
.Use (Allocate)
.Release

¡Request: A resource must be requested before its use.
¡Use (Allocate): If a resource which are requested by a process is free then process use the resource otherwise wait for that resource.
¡Release: After the use of resource a resource must be release.

Necessary condition for deadlock:



¡Following 4 conditions are satisfied simultaneously then deadlock must be occur in the system.

1.Mutual Exclusion

2.Hold & wait
3.No preemption
4.Circular wait

1-Mutual exclusion:

A resource must be use by only one process at a time. If another process request that resource then it must be block.

2-Hold & Wait:

There is a process hold a resource and wait for additional resource.

3-No Preemption:

A resource can be preempt only after completing current execution.

4-Circular Wait:

There must be a set of process which are held by another resource.

No comments:

Post a Comment

Popular Posts