Question: what is the difference between prevention and avoidance explain?
Answer: Deadlock prevention is the mechanism to ensure that at least one of the necessary conditions for deadlock can never occur. On the other hand, deadlock avoidance is the mechanism to ensure that the system does not enter an unsafe state.