what are deadlocks

what are deadlocks

1 year ago 71
Nature

A deadlock is a situation in concurrent computing or operating systems where no member of a group of entities can proceed because each waits for another member, including itself, to take action, such as sending a message or releasing a lock. Deadlocks are a common problem in multiprocessing systems, parallel computing, and distributed systems, because in these contexts systems often use software or hardware locks to arbitrate shared resources and implement process synchronization. Key characteristics of a deadlock include:

  • Mutual Exclusion: Two or more resources are non-shareable, meaning only one process can use them at a time.
  • Hold and Wait: A process is holding at least one resource and waiting for others.
  • No Preemption: A resource cannot be taken from a process unless the process releases the resource.
  • Circular Wait: A set of processes waiting for each other in circular form.

Deadlocks can be prevented or avoided by structuring data and requests to avoid creating deadlocks. If a deadlock does occur, the only alternative is to abort (stop) one of the processes. Deadlocks had a major impact on the development of operating systems and the structure of databases. It is important to note that the term "deadlock" can also refer to a type of lock bolt used in mortice locks, which does not have a latch/catch section for the operation of a door knob/handle.

Read Entire Article