General design policy
Spend resources, effort and time during normal operation to prevent deadlock from occurring ? (pessimistic and conservative) or
Incur low overhead during normal deadlock-free operation without worrying about deadlock. Take care of resolving it when and if it happens? (optimistic). In this case, recovery from deadlock may be expensive.
- Detect deadlock and recover.
Optimizatimal solution? between cost of recovery and cost of prevention.