A deadlock is a set of processes each waiting for a resource held by another.
1Necessary conditions
Mutual exclusion
Hold and wait
No preemption
Circular wait
2Handling
Prevention (break a condition)
Avoidance (Banker's algorithm, safe states)
Detection and recovery
Ignoring (ostrich algorithm)