Deadlock Handling Methods In Operating System In Hindi | Methods To Handle Deadlock | BTech-BE
Methods for Handling Deadlocks
Generally speaking there are three ways of handling deadlocks:
Deadlock prevention or avoidance – Do not allow the system to get into a deadlocked state.
Deadlock detection and recovery – Abort a process or preempt some resources when deadlocks are detected.
Ignore the problem all together – If deadlocks only occur once a year or so, it may be better to simply let them happen and reboot as necessary than to incur the constant overhead and system performance penalties associated with deadlock prevention or detection. This is the approach that both Windows and UNIX take.
In order to avoid deadlocks, the system must have additional information about all processes. In particular, the system must know what resources a process will or may request in the future. ( Ranging from a simple worst-case maximum to a complete resource request and release plan for each process, depending on the particular algorithm. )
Deadlock detection is fairly straightforward, but deadlock recovery requires either aborting processes or preempting resources, neither of which is an attractive alternative.
If deadlocks are neither prevented nor detected, then when a deadlock occurs the system will gradually slow down, as more and more processes become stuck waiting for resources currently held by the deadlock and by other waiting processes. Unfortunately this slowdown can be indistinguishable from a general system slowdown when a real-time process has heavy computing needs.
methods to handle deadlock in os | methods to handle deadlock in os in hindi | deadlock handling in operating system | deadlock handling in operating system in hindi |