search
Login

Categories


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

3.8k questions

4k answers

117 comments

10.7k users

0 votes
445 views
asked Guru 27.1k points 31 48 95

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 Guru 39.1k points 10 21 33
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 Guru 24.6k points 29 51 79
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 Sr Member 4.8k points 10 25 31

Related questions

0 votes
1 answer 30 views
30 views
asked sara Guru 24.6k points 29 51 79
0 votes
1 answer 3.8K views
3.8K views
What is a Phantom Deadlock in database?
asked steve Sr Member 1.5k points 8 23 40
0 votes
1 answer 103 views
103 views
asked sunny Expert 11.4k points 14 22 28
0 votes
1 answer 82 views
82 views
asked rock Expert 15k points 15 23 29
0 votes
1 answer 125 views
...