Developer community
0 votes
455 views
asked by Guru (27.1k points) 31 48 96 | 455 views

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 Guru (39.1k points) 10 22 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 by Guru (24.6k points) 29 51 77
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 Sr Member (4.8k points) 10 23 31

Related questions

0 votes
1 answer
asked by sara Guru (24.6k points) 29 51 77 | 30 views
0 votes
1 answer
asked by steve Sr Member (1.5k points) 8 23 36 | 3.8k views
0 votes
1 answer
asked by sunny Expert (11.4k points) 14 22 28 | 106 views
0 votes
1 answer
asked by rock Expert (15k points) 15 23 29 | 81 views
0 votes
1 answer
asked by sunny Expert (11.4k points) 14 22 28 | 126 views
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

Categories


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

3.8k questions

4k answers

117 comments

10.7k users

3,751 questions
4,046 answers
117 comments
10,709 users