Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starvation and Deadlock (Operating System)

I know deadlock and starvation definitions, but I'm still confused in these few points (Unable to arrive at which one is correct)

  • a) deadlock is a extreme case of starvation
  • b) deadlock and starvation are two unrelated concepts
  • c) starvation only leads to deadlock
like image 694
Mudit Kumar Saini Avatar asked Oct 11 '15 20:10

Mudit Kumar Saini


1 Answers

Deadlock: is when all the processes do not get access to resources because every process is waiting for some another process and there is a cycle.

Starvation: is when a low priority process does not get access to the resources it needs because there is a high priority process accessing the resources. The entire system of processes hasn't come to halt in this case.


Since, only low priority process does not have access to resources in starvation, while in deadlock no process has access to the resources they need therefore deadlock is an extreme case of starvation with the criterion of extremeness being the total count of process unable to access the resource.


Deadlock and starvation are related as both are the cases of a process not having access to the resource.


Starvation does not lead to deadlock as a starving low priority process keeps waiting while other processes with high priority run to completion.

Rumor has it that when they shut down the IBM 7094 at MIT in 1973, they found a low-priority process that had been submitted in 1967 and had not yet been run.


Mentioned in the Operating System Concepts book by Abraham Silberschatz, Peter B. Galvin, Greg Gagne

like image 74
displayName Avatar answered Oct 03 '22 00:10

displayName