“…The first, deadlock prevention, ensures that programs are correct by design and can never have circular lock dependencies. In the deadlock prevention literature, one finds type and effect systems [2,4,6,11,15,17] that guarantee deadlock freedom by statically enforcing a global lock-acquisition ordering, which must be respected by all threads. Second, deadlock detection and recovery strategies dynamically detect deadlocks and preempt some of the deadlocked threads, releasing (some of) their locks, so that the remaining threads can make progress.…”