What is a deadlock?
A deadlock is a situation that can increase when two units, A and B use a shared resource. Assume that unit B cannot complete its task unless unit A completes its task. At the similar time, unit B has been assigned a resource that unit A needs. If this happens, neither unit can total its task. Unit A is waiting for the resource it requirements, which is being held by unit B at the similar time, unit B is waiting for unit A to finish before it can release that resource.