A deadlock occurs when two or more threads are executed and are waiting for each other to finish. This problem manifests in computer programs when they hang. For the end user, this can be very bad and can result in the loss or corruption of data. An example of this is executing two batches of data input that crash halfway through a transaction and cannot be rolled back. This is not good; let me explain why with an example.
Consider a major banking transaction that will take £1 million out of a customer's business bank account to pay their Her Majesty's Revenue and Customs (HMRC) tax bill. The money is taken from the business account, but before the money is deposited in the HMRC bank account, a deadlock occurs. There is no recovery option and so the application has to be terminated and restarted. As a result, the business bank account is reduced by £1 million but the HMRC tax bill has not been paid. The customer is still liable...