Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Operating System - Interview Questions and Answers for 'Deadlock' - 4 question(s) found - Order By Newest | ||||
Frequently asked to fresh graduates. | ||||
| ||||
Ans. When two threads are waiting each other and cant precede the program is said to be deadlock. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   threads   multi threading   operating system   deadlock  concurrency Asked in 23 Companies basic   frequent | ||||
| ||||
Ans. mutual exclusion i.e the resource is not shareable and hence a process should have exclusive access to it at a particular time Hold and Wait i.e the process doesn't release all existing resources held by it before requesting for another one. No preemption i.e noone can forcefully release a resource held by another process and the process should voluntarily release the resource held by it. Circular Wait - For ex, P1 is waiting on resource to be released by P2, P2 is waiting on resource to be released by P3 and P3 is waiting on the resource to be released by P1 | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  deadlock  process | ||||
| ||||
Ans. Livelock is when two threads or processes get deadlocked because they try to perform the same action to come out of a potential deadlock. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  livelock  deadlock] | ||||
| ||||
Ans. https://howtodoinjava.com/java/multi-threading/writing-a-deadlock-and-resolving-in-java/ | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  multithreading  threads  deadlock Asked in 1 Companies intermediate | ||||