• edited by
137 views
1 1 vote

A system shares $12$ resources of the same type between $3$ processes P1, P2 and P3. The current allocation and maximum requirements of the processes are shown below:
$$
\begin{array}{|c|c|c|}
\hline
\text{Process} & \text{Current Allocation} & \text{Maximum Requirement} \\
\hline
P1 & 3 & 4 \\
P2 & 4 & 9 \\
P3 & 4 & 8 \\
\hline
\end{array}
$$
Which of the following best describes the current state of the system?

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

1 Answer

1 1 vote
$$
\begin{array}{|c|}
\hline
\text{Need} \\
\hline
1 \\
5 \\
4 \\
\hline
\end{array}
$$

$\mathrm{P} 1 \rightarrow \mathrm{P} 3 \rightarrow \mathrm{P} 2$

- First P1 can satisfy, and after Completion the system will have 4 resources.

- Second P3 can satisfy, and after Completion the system will have 8 resources.

- Third P2 can satisfy, and after Completion the system will have 12 resources
Answer:
Position:
Show:

Related questions

2 2 votes
1 1 answer
490
490 views
GO Classes asked Sep 15, 2025
490 views
Void main() { int a = 0; for (int i = 0; i < 4; i++) { if (fork() == 0) { a++; return ; } else { a++; ...
2 2 votes
2 2 answers
210
210 views
GO Classes asked Sep 15, 2025
210 views
A system is composed of four processes, $\{\mathrm{P} 1, \mathrm{P} 2, \mathrm{P} 3, \mathrm{P} 4\}$, and two types of consumable resources, $\{\mathrm{R} 1, \mathrm{R} 2...
2 2 votes
1 1 answer
303
303 views
GO Classes asked Sep 15, 2025
303 views
In a uniprocessor machine one process can run at a time, in such a machine four threads $\mathrm{P} 1, \mathrm{P} 2, \mathrm{P} 3$ and $\mathrm{P 4}$ of a process P are r...
1 1 vote
1 1 answer
166
166 views
GO Classes asked Sep 15, 2025
166 views
Consider a process Z with three threads A, B, and C. A single semaphore is to be used for synchronization among these threads. For which of the following synchronization ...