InterviewSolution
| 1. |
What is the difference between deadlock and starvation in the context of Operating Systems? |
||||||||||
|
Answer» Deadlock - When each process possesses a resource and waits for ANOTHER process to retain a resource, a deadlock ensues. Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait are all necessary circumstances for the deadlock to occur. No process that is holding one resource while waiting for another is performed in this scenario. Starvation - When high priority processes continue to RUN while low priority processes are stalled for an indeterminate time, this is known as starvation. A continual stream of higher-priority processes in a densely loaded computer system can prevent a low-priority operation from ever receiving the CPU. When resources are SCARCE, high-priority processes consume them continuously. Ageing can help to tackle the problem of starvation. The importance of LONG waiting processes is increasingly raised as processes age. The following table lists the differences between deadlock and starvation:
|
|||||||||||