Explain between deadlock detection and avoidance.

This answer is restricted. Please login to view the answer of this question.

Login Now

The difference between deadlock prevention and avoidance are

Factors Deadlock Prevention Deadlock Avoidance
Concept It blocks at least one of the conditions necessary for deadlock to occur. It ensures that system does not go in unsafe state
Resource Request All the resources are requested together. Resource requests are done according to the available safe path.
Information required It does not requires information about existing resources, available resources and resource requests It requires information about existing resources, available resources and resource requests
Procedure It prevents deadlock by constraining resource request process and handling of resources. It automatically considers requests and check whether it is safe for system or not.
Preemption Sometimes, preemption occurs more frequently. In deadlock avoidance there is no preemption.
Resource allocation strategy Resource allocation strategy for deadlock prevention is conservative. Resource allocation strategy for deadlock prevention is not conservative.
Future resource requests It doesn’t requires knowledge of future process resource requests. It requires knowledge of future process resource requests.
Advantage It doesn’t have any cost involved because it has to just make one of the conditions false so that
deadlock doesn’t occur.
There is no system under-utilization as this method works dynamically to allocate the resources.
Disadvantage Deadlock prevention has low device utilization. Deadlock avoidance can block processes for too long.
Example Spooling and non-blocking synchronization algorithms are used. Banker’s and safety algorithm is used.
If you found any type of error on the answer then please mention on the comment or report an answer or submit your new answer.
Leave your Answer:

Click here to submit your answer.

Discussion
0 Comments
  Loading . . .