The Gateway to Computer Science Excellence
+6 votes

Which of the following is not a necessary condition for deadlock?

  1. Mutual exclusion
  2. Reentrancy
  3. Hold and wait
  4. No pre-emption
in Operating System by Boss (30.8k points) | 2k views

4 Answers

+9 votes
Best answer

Answer B) Reentrancy

4 necessary condition for being deadlock are

  • Mutual Exclusion
  • Hold and wait
  • No Preemption
  • Circular wait
by Veteran (119k points)
selected by
+6 votes
ans is (b)
1. Mutual Exclusion Condition
The resources involved are non-shareable.
Explanation: 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.

2. Hold and Wait Condition
Requesting process hold already, resources while waiting for requested resources.
Explanation: 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.

3. No-Preemptive Condition
Resources already allocated to a process cannot be preempted.
Explanation: Resources cannot be removed from the processes are used to completion or released voluntarily by the process holding it.
4. Circular Wait Condition
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.
by Active (4.9k points)
+2 votes
There are four necessary condition for happenning deadlock in system.

Mutual Exclusion    Solution       Spool Everything

Hold and wait          Solution       Request all the required resourses before start of the execution but remember it is not practical.

No-Preemption         Solution      Preempt the process to using resourses.

Circular Wait         Solution       Assign each resources a unique number and each process always request to resourses in increasing order of the number never go for backward but go for forward.
by Boss (10.2k points)
edited by
0 votes

A function is said to be reentrant if there is a provision to interrupt the function in the course of execution, service the interrupt service routine and then resume the earlier going on function, without hampering its earlier course of action. Reentrant functions are used in applications like hardware interrupt handling, recursion, etc

by Junior (621 points)

Related questions

+1 vote
1 answer
asked Jan 9, 2019 in Operating System by Hardik Vagadia (345 points) | 81 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,297 answers
104,978 users