Deadlock: a deadlock occurs when two or more processes compete for resources during execution. If there is no external force, they will not be able to proceed. It is said that the system is in a deadlock state or the system has a deadlock. These processes that are always waiting for each other are called deadlock processes.
Not complete to be continued ,,,
For example, the deadlock condition: the owner of resource R1 needs P2 resources to complete the work; the owner of P2 resources needs R2; the owner of R2 needs the owner of P1 and P1, waiting for R1.
Deadlock Prevention: if there is only one process in the system, of course, no deadlock will occur. If each process requires only one system resource, no deadlock will occur. However, this is only an ideal state. In reality, it is inevitable.
- Preemption prohibited: No Preemption
- Hold and wait: Hold and wait
- Mutual Exclusion: Mutual Exclusion
- Loop wait: Bounded waiting
Deadlock (deadlock)