In an operating system, a deadlock occurs when a process or thread enters a waiting state because a requested system resource is held by another waiting process, which in turn is waiting for another resource held by another waiting process.
What is deadlock and its types?
Deadlock is a situation where a set of processes are blocked because each process is holding a resource and waiting for another resource acquired by some other process. ... A similar situation occurs in operating systems when there are two or more processes that hold some resources and wait for resources held by other(s).
What is deadlock example?
A deadlock is a situation in which two computer programs sharing the same resource are effectively preventing each other from accessing the resource, resulting in both programs ceasing to function. ... This led to the problem of the deadlock. Here is the simplest example: Program 1 requests resource A and receives it.