Basic CS-Operating System [TCS Placement]: Sample Questions 20 - 20 of 35

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 20

Operating System

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.
Given the Image is Define the Coffman՚s Conditions That Lead to a Deadlock

Developed by: