edited by
13,809 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

4 votes
4 votes

Process

Current Allocation

Max Requirement

Need

P1 3 7 4
P2 1 6 5
P3 3 5 2

Since,Total number of available tapes =9 and currently allocated tapes (3+1+3)=7 .Available no of tapes =2.

Request for p3 can be fulfilled as Need of tapes < Available tapes .Now available number of tapes=(3+2). Further,

request of  p1 or p2 can be fulfilled as need (4 or 5) <= available no of tapes. Hence ,system is in safe condition

and not deadlock. Option B is correct.

0 votes
0 votes

Answer should be D. because if P1 asks for 2 more then there is deadlock. 

0 votes
0 votes
Option A is straightforward to eliminate , the reason being there can never be a situation in case of safe state leading to deadlock, that’s why we study Banker’s algorithm

Coming to options C and D, when the system is in an unsafe state, we can’t really comment using the banker’s algorithm, so it is also eliminated.

 

So,only option B is remaining,so it has be right :)
Answer:

Related questions

41 votes
41 votes
3 answers
2
khushtak asked Feb 14, 2017
13,056 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
13,064 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,861 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