This document discusses deadlocks in operating systems. It begins by defining a deadlock as a state where a set of processes are all waiting for resources held by other processes in the set. It then covers various techniques for dealing with deadlocks, including: prevention methods that avoid one of the necessary conditions for deadlocks; avoidance methods that use additional information to plan allocations and avoid unsafe states; detection methods that identify when a deadlock has occurred; and recovery methods to resolve deadlocks. Specific algorithms covered include the banker's algorithm for deadlock avoidance and using wait-for graphs for deadlock detection.