- There are four factors that must be met for a deadlock to occur.
- Exclusion from each other: When two persons meet on the landings, they cannot just stroll through because there is only enough room for one person. The first prerequisite for the occurrence of the deadlock is to enable only one person (or process) to use the step between them (or the resource).
- Wait and see: Holding occurs when two people refuse to retreat and defend their territory. This is the next condition that must be met in order to break the deadlock.
- No Preemption: To break the impasse, simply cancel one of the processes and let the others run. However, the Operating System does not. It allocates resources to the processors for as long as the task requires till it is accomplished. As a result, there is no need for a temporary reallocation of resources. It's the third deadlock condition.
- Circular Wait: Circular wait occurs when two persons refuse to retreat and wait for each other to recede so that they can finish their assignment. It's the last thing that can cause a deadlock.
Which are the necessary conditions to achieve a deadlock in Operating System?
Asked 04-Apr-2022
Viewed 317 times
Which are the necessary conditions to achieve a deadlock in Operating System?