retagged by
895 views
5 votes
5 votes

Which of the following statements is NOT true?                                             

  1.     Deadlock can never occur if all resources can be shared by competing processes.
  2.     Deadlock can never occur if resources must be requested in the same order by processes.
  3.     If the resource allocation graph depicts a cycle, then deadlock has certainly occurred.
  4.     The Banker’s algorithm for avoiding deadlock requires knowing resource requirements in advance 
retagged by

3 Answers

Best answer
4 votes
4 votes

statement C says

 If the resource allocation graph depicts a cycle, then deadlock has certainly occured.

Here we know Cycle in a resorce graph=> Unsafe State

again, All deadlock is Unsafe State BUT all Unsafe State is not Deadlock 

 so C is the correct answer here

selected by
4 votes
4 votes

Option A    Deadlock can never occur if all resources can be shared by competing processes.

is True .

Reason :  This is based on Mutual exclusion condition which says  resources are not shareable.

If all resources are sharable then Deadlock never occur .

Option B   Deadlock can never occur if resources must be requested in the same order by processes.

is True .

Reason: This is based on Circular wait  condition,which states that -- not all processes request resources in the same order, so it is possible for them to be waiting in a circle for one another (A waits for B, B waits for C, and C waits for A).

If there is No Circular wait then there is No Deadlock as well .

Option C   If the resource allocation graph depicts a cycle, then deadlock has certainly occured.

is Not True .

Reason :

The resource allocation graph represents processes and the resources they depend on.

One circle appears for each process. One little box appears for each type of resource, with a dot in the box for each instance of the resource. Arrows appear from circles to boxes if the process is waiting for that resource; arrows appear from dots to circles if that resource instance is allocated to that process.
Cycles are a necessary but not sufficient pre-condition for deadlock to exist.

However, if each box in the cycle contains only one dot means only a single resource , then deadlock has occurred .

Option D  The Banker’s algorithm for avoiding deadlock requires knowing resource requirements in advance.

is True .

Reason :

The Banker’s algorithm distinguishes between deadlock-free (safe) and deadlock-prone (unsafe) states. Processes must declare in advance what resources they may require in the future. The system can track its inventory of each resource with the goal of having enough resources to supply the future needs of running processes. That way, when a new process wants to start up,
the system can decide whether it has enough resources to serve this new process without putting existing processes in the situation of deadlock.

Hence Option C is false among given statements .

2 votes
2 votes
(C) is wrong because if resources have multiple instances then circular wait is not guranateed condition for a deadlock to be ocurred
Answer:

Related questions

2 votes
2 votes
2 answers
1