Deadlocks can be prevented by preventing at least one of the four required conditions:
- 7.4.1 Mutual Exclusion. Shared resources such as read-only files do not lead to deadlocks. ...
- 2 Hold and Wait. ...
- 3 No Preemption. ...
- 4 Circular Wait.
What do you mean by deadlock avoidance?
Deadlock avoidance merely works to avoid deadlock; it does not totally prevent it. The basic idea here is to allocate resources only if the resulting global state is a safe state. In other words, unsafe states are avoided, meaning that deadlock is avoided as well.
How do you avoid process deadlock?
Tips on avoiding deadlocks
- Ensure the database design is properly normalized.
- Develop applications to access server objects in the same order each time.
- Do not allow any user input during transactions.
- Avoid cursors.
- Keep transactions as short as possible.