Search⌘ K

Detection And Recovery

Explore how to detect and recover from deadlocks in concurrency environments. Understand the practical approach of allowing rare deadlocks to occur and how systems use deadlock detection techniques. Learn the balance of when to invest effort in prevention versus recovery, supported by examples from operating systems and databases.

We'll cover the following...

Detect and recover

One final general strategy is to allow deadlocks to occur occasionally, and then take some action once such a deadlock has been detected. For example, if an OS froze once a year, you would just reboot it and get happily (or grumpily) on with your work. If deadlocks are rare, such a non-solution is indeed quite pragmatic.

Many database systems employ deadlock detection and recovery techniques. A deadlock detector runs periodically, building a resource graph and checking it for cycles. In the event of a cycle (deadlock), the system needs to be restarted. If more intricate repair of data structures is ...