TCS Papers: Sample Questions 391 - 391 of 502

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 391

» Basic CS » Operating System

Essay Question▾

Describe in Detail

List the Coffman’s conditions that lead to a deadlock.


Coffman identified 4 conditions that must hold simultaneously for there to be a deadlock.

  • Mutual Exclusion Condition

    • Only one process may use a critical resource at a time.

    • The resources involved are non-shareable.

    • At least one resource (thread) must be held in a non-shareable mode, that is, only one process at a time claims exclusive control of the resource.

    • If another process requests that resource, the requesting process must be delayed until the resource has been released.

  • Hold and Wait Condition

    • A process may be allocated some resources while waiting for others.

    • Requesting process hold already, resources while waiting for requested resources.

    • There must exist a process that is holding a resource already allocated to it while waiting for additional resource that are currently being held by other processes.

  • No-Preemptive Condition

    • No resource can be forcible removed from a process holding it.

    • Resources already allocated to a process cannot be preempted.

    • Resources cannot be removed from the processes are used to completion or released voluntarily by the process holding it.

  • Circular Wait Condition

    • A closed chain of processes exists such that each process holds at least one resource needed by another process in the chain.

    • The processes in the system form a circular list or chain where each process in the list is waiting for a resource held by the next process in the list.

Image of Coffman’s conditions

Image of Coffman’S Conditions

Given the image is define the Coffman’s conditions that lead to a deadlock