Difference between Deadlock and Starvation in OS

By | September 23, 2020

Deadlock and Starvation both are the conditions where the processes requesting for a resource has been delayed for a long. Although deadlock and starvation both are different from each other in many aspects.

1. Deadlock :
Deadlock is a situation where a set of processes are blocked because each process is holding a resource and waiting for another resource acquired by some other process.

It is important to mention that the situation of deadlock occurs if these four conditions hold true all simultaneously –

  1. Mutual Exclusion: One or more than one resource are non-sharable (Only one process can use at a time)
  2. Hold and Wait: A process is holding at least one resource and waiting for resources.
  3. No Preemption: A resource cannot be taken from a process unless the process releases the resource.
  4. Circular Wait: A set of processes are waiting for each other in circular form.

For example, in the below diagram, Process 1 is holding Resource 1 and waiting for resource 2 which is acquired by process 2, and process 2 is waiting for resource 1. Hence both process 1 and process 2 are in deadlock.

2. Starvation :
Starvation is the problem that occurs when high priority processes keep executing and low priority processes get blocked for indefinite time. In starvation resources are continuously utilized by high priority processes. Problem of starvation can be resolved using Aging. In Aging priority of long waiting processes is gradually increased.

Difference between Deadlock and Starvation :


S.No. Deadlock Starvation
1. All processes keep waiting for each other to complete and none get executed. High priority processes keep executing and low priority processes are blocked.
2. Resources are blocked by the processes. Resources are continuously utilized by high priority processes.
3. No process can make progress Apart from the victim process other processes can progress or proceed
4. Requires external intervention to end this sitution. May or may not require external intervention.
5. It can be prevented by avoiding the necessary conditions for deadlock It can be prevented by Aging

Note :

  1. Deadlock arises when four conditions Mutual exclusion, Hold and wait, No preemption, and Circular wait occurs simultaneously.
  2. Deadlock is often called by the name circular wait whereas, the starvation is called Lived lock.
  3. Deadlock can be prevented by the avoiding at least one condition : Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait.
  4. Starvation can be prevented by aging.
  5. Other name of deadlock is Circular Waiting. Other name of starvation is Lived lock.



Please write comments if you find anything incorrect. A gentle request to share this topic on your social media profile.