Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

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

0 votes
asked by (27.1k points) 31 54 113

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 (39.1k points) 10 22 39
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 (24.6k points) 31 56 96
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 (4.8k points) 10 25 32

Related questions

0 votes
1 answer 31 views
31 views asked by sara (24.6k points) 31 56 96
0 votes
1 answer 3.8k views
3.8k views asked by steve (1.5k points) 8 23 41
0 votes
1 answer 108 views
108 views asked by sunny (11.4k points) 14 23 31
0 votes
1 answer 92 views
92 views asked by rock (15k points) 16 23 34
0 votes
1 answer 131 views