top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are the necessary conditions for deadlock to happen and why?

+2 votes
450 views
What are the necessary conditions for deadlock to happen and why?
posted Nov 2, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Deadlock Conditions

Mutual exclusion

The resources involved must be unshareable; otherwise, the processes would not be prevented from using the resource when necessary.

Hold and wait or partial allocation

The processes must hold the resources they have already been allocated while waiting for other (requested) resources. If the process had to release its resources when a new resource or resources were requested, deadlock could not occur because the process would not prevent others from using resources that it controlled.

No pre-emption

The processes must not have resources taken away while that resource is being used. Otherwise, deadlock could not occur since the operating system could simply take enough resources from running processes to enable any process to finish.

Resource waiting or circular wait

A circular chain of processes, with each process holding resources which are currently being requested by the next process in the chain, cannot exist. If it does, the cycle theorem (which states that "a cycle in the resource graph is necessary for deadlock to occur") indicated that deadlock could occur.

answer Nov 3, 2017 by Manikandan J
Similar Questions
+1 vote

Which is the best page replacement algorithm and Why? How much time is spent usually in each phases and why?

+1 vote

What happens after you write “a.out” and press enter. What are the functionality performed by the OS after executable file is created of your code.

...