Deadlock Vs Starvation

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. Deadlock is a condition where no process proceeds for execution, and each waits for resources that have been acquired by the other processes. On the other hands, in Starvation, process with high priorities continuously uses the resources preventing low priority process to acquire the resources.


Key Differences Between Deadlock and Starvation:

  1. In a deadlock, none of the processes proceeds for execution, each process get blocked waiting for the resources acquired by the another process. On the other hand, starvation is a condition where the processes that possess higher priority is allowed to acquire the resources continuously by preventing the low priority processes to acquire resources resulting in indefinite blocking of low priority processes.
  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. Deadlock is often called by the name circular wait whereas, the starvation is called Lived lock.
  4. In Deadlock the resources are blocked by the process whereas, in starvation, the processes are continuously being used by the processes with high priorities.
  5. 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.

Conclusion:

Both Deadlock and Starvation delays the process execution by blocking it. On one hand where deadlock can cause processes to starve, and on the other hands starvation can get the processes out of the deadlock.

Comments

Popular posts from this blog

Process Vs Thread

Reasoning Vs Inference

Frame vs Packet