3,195 views

4 Answers

Best answer
9 votes
9 votes

Answer B) Reentrancy

4 necessary condition for being deadlock are

  • Mutual Exclusion
  • Hold and wait
  • No Preemption
  • Circular wait
selected by
6 votes
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.
 
2 votes
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.
edited by
0 votes
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

Answer:

Related questions

1 votes
1 votes
2 answers
2