edited by
13,522 views
28 votes
28 votes

A system shares $9$ tape drives. The current allocation and maximum requirement of tape drives for that processes are shown below:

$$\begin{array}{ccc}  \textbf{Process} & \textbf{Current Allocation} & \textbf{Maximum Requirement} \\ \text{P1} & 3 & 7 \\ \text{P2} & 1 & 6 \\ \text{P3} & 3 & 5 \\  \end{array}$$

Which of the following best describes current state of the system?

  1. Safe, Deadlocked
  2. Safe, Not Deadlocked
  3. Not Safe, Deadlocked
  4. Not Safe, Not Deadlocked
edited by

7 Answers

Best answer
46 votes
46 votes

$$\small\begin{array}{|c|c|c|c|} \hline \textbf{Process} & \textbf{Current Allocation} & \textbf{Max Requirement}& \textbf{Need} \\\hline \text{P1} & 3 & 7 & 4 \\\hline \text{P2} & 1 & 6 & 5 \\\hline \text{P3} & 3 & 5  & 2\\\hline  \end{array}$$Given there are total $9$ tape drives,

So, according to the above table we can see we have currently allocated ($7$ tape drive), so currently Available tape drives $= 2$

So, $P3$ can use it and after using it will release it $3$ resources New Available $=5$

then $P1$ can use it and will release it $3$ resources so New Available $= 8$

and lastly $P2$ so, all the process are in SAFE STATE and there will be NO DEADLOCK

Safe Sequence will be $\bf P3\to P2\to P1$ or $\bf P3\to P1 \to P2.$

Answer will be (B) only.

edited by
6 votes
6 votes

Require P1 =7-3 =4

           P2 =6-1 =5  

           P3 =5-3 =2

Available 9-(3+1+3) =2

P3->P2->P1

OR

P3->P1->P2

Hence Safe and NO Deadlocked

Ans B

Answer:

Related questions

41 votes
41 votes
2 answers
2
khushtak asked Feb 14, 2017
12,943 views
In a file allocation system, which of the following allocation scheme(s) can be used if no external fragmentation is allowed?ContiguousLinkedIndexed$1$ and $3$ only$2$ on...
36 votes
36 votes
3 answers
3
Madhav asked Feb 14, 2017
12,868 views
Consider the set of process with arrival time (in milliseonds), CPU burst time (in millisecods) and priority ($0$ is the highest priority) shown below. None of the proce...
30 votes
30 votes
5 answers
4
Madhav asked Feb 14, 2017
11,725 views
Which of the following is/are shared by all the threads in a process?Program counterStackAddress spaceRegisters(I) and (II) only(III) only(IV) only(III) and (IV) only