C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

What is deadlock?

0 votes
397 views
asked by john Guru (27,140 points)

3 Answers

0 votes
Deadlock is a situation when two threads are waiting on each other to release a resource. Each thread is waiting for a resource which is held by the other waiting thread.
answered by rajesh Guru (39,140 points)
0 votes
Suppose a process request resources; if the resources are not available at that time the process enters into a wait state. A waiting process may never again change state, because the resources they have requested are held by some other waiting processes. This situation is called deadlock.
answered by sara Guru (24,570 points)
0 votes
When a thread holds a resource and waits for another resource to be realized by second thread, the second thread holding a resource and waiting for realized by first thread. Both the threads will be waiting in defiantly and they never execute this switching is called as “Deadlock”.

In java there is no mechanism to avoid deadlock situation, it is the responsibility of the programmer to write proper logic to avoid deadlock situation.
answered by augustaina Sr Member (4,820 points)

Related questions

0 votes
1 answer 26 views
0 votes
1 answer 3,804 views
3,804 views asked by steve Sr Member (1,460 points)
0 votes
1 answer 96 views
96 views asked by sunny Expert (11,410 points)
0 votes
1 answer 77 views
0 votes
1 answer 111 views
...