• What is deadlock? What is starvation? How do they differ from each other?
Deadlock occurs when each process holds a resource and wait for other resource held by any other process. Necessary conditions for deadlock to occur are Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait
Starvation is the problem that occurs when high priority processes keep executing and low priority processes get blocked for an indefinite time
The difference between the two is that in a deadlock, none of the processes proceeds for execution, each process gets blocked waiting for the resources acquired by another process. On the other hand, starvation is a condition where the processes that possess higher priority are allowed to acquire the resources continuously by preventing the low priority processes to acquire resources resulting in indefinite blocking of low priority processes.
Comments
Leave a comment