Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| ||||
Operating System - Interview Questions and Answers for 'Deadlock' - 4 question(s) found - Order By Rating | ||||
| ||||
Ans. https://howtodoinjava.com/java/multi-threading/writing-a-deadlock-and-resolving-in-java/ | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
| ||||
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. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
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 | ||||
![]() | ||||
![]() ![]() ![]() | ||||
![]() | ||||
| ||||
Ans. When two threads are waiting each other and cant precede the program is said to be deadlock. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||