University Institute of Engineering (UIE)
University Institute of Engineering (UIE)
List-of-content
Deadlocks: Deadlock characterization and conditions for deadlock,
deadlock prevention, Deadlock avoidance-safe state, resource
allocation graph algorithm, Banker’s algorithms-Safety algorithm,
Deadlock detection, Recovery from deadlock.
.
There are four conditions that are necessary to achieve deadlock:
Mutual Exclusion - At least one resource must be held in a non-sharable mode;
If any other process requests this resource, then that process must wait for the
resource to be released.
Hold and Wait - A process must be simultaneously holding at least one
resource and waiting for at least one resource that is currently being held by
some other process.
No preemption - Once a process is holding a resource ( i.e. once its request has
been granted ), then that resource cannot be taken away from that process
until the process voluntarily releases it.
Circular Wait - A set of processes { P0, P1, P2, . . ., PN } must exist such that
every P[ i ] is waiting for P[ ( i + 1 ) % ( N + 1 ) ]. ( Note that this condition
implies the hold-and-wait condition, but it is easier to deal with the conditions
if the four are considered separately. )
In some cases deadlocks can be understood more clearly through the use
of Resource-Allocation Graphs, having the following properties:
Request Edges - A set of directed arcs from Pi to Rj, indicating that process
Pi has requested Rj, and is currently waiting for that resource to become
available.
Process
Pi requests instance of Rj
Pi Rj
Pi is holding an instance of Rj
https://www.studytonight.com/operating-system/
https://computing.llnl.gov/tutorials/
https://www.tutorialspoint.com/operating_system/index.htm#:~:text=An%20operating%20sy
stem%20(OS)%20is,software%20in%20a%20computer%20system.
https://www.javatpoint.com/os-tutorial
https://www.guru99.com/operating-system-tutorial.html
https://www.geeksforgeeks.org/operating-systems/