What is the difference between deadlock and starvation? | Deadlock vs Starvation

1. Deadlock occurs when none of the processes in the set is able to move ahead due to occupancy of the required resources by some other process as shown in the figure below, on the other hand Starvation occurs when a process waits for an indefinite period of time to get the resource it requires.

2. Deadlock arises when four conditions Mutual exclusion, Hold and wait, No preemption, and Circular wait occurs simultaneously. However, starvation occurs when process priorities have been enforced while allocating resources, or there is uncontrolled resource management in the system.

3. Other name of deadlock is Circular Waiting. Other name of starvation is Lived lock.

4. Deadlock can be prevented by the avoiding the conditions like mutual exclusion, Hold and wait, and circular wait and by allowing the preemption of the processes that are holding resources for a long time. On the other hand, Starvation can be prevented by aging.

5. When deadlock occurs no process can make progress, while in starvation apart from the victim process other processes can progress or proceed.

Comments