In deadlock prevention, we need to disable at least one condition among four necessary conditions of deadlock.
Four deadlock conditions with "way to disable them" are explained below:-
1. Mutual Exclusion :- To disable this, shared resources are used (means one resource can be shared with many processes simultaneously).
2. Hold and wait :- To disable this, system can make a rule that every process should occupy needed resources in starting of their execution. If process request for any resource later than that process should release all previously allocated resources.
3. No preemption :- To disable this, preemption is allowed.
4. Circular wait :- To disable this, system provide number to all resources and make a rule that processes can request for higher numbered resources than max. number of their currently occupied resources.