DEADLOCK
Chapter 10:-
1. Mutually exclusive is defined as only allowing one process in a critical section at one time. It is serially reusable. The Hold & Wait prevention is to hold a resource and request for another.
2.Circular waiting will do this example:-
Process 1 hold resource 1 and ask for resource 2. While Process 2 hold on to Resource 2 and ask for Resource 1
3. No pre-emption is when a process ask for a resource and the resource is not available. Then it cannot withdraw its request and must complete it.
4. Handling deadlocks :-
- Ignore => Since it does not happen frequently
- Detect and Recover => Detection / or recovery process
- Prevent => Eliminating possibility of deadlock by designing deadlock out of the OS. This remove mutual exclusion , allow pre-emption of resources, disallow partial allocation of resources and do not permit circular waiting.
- Avoid => Allow potential deadlock, check berfore allocating resorces.