290 views
2 2 votes

Consider a system with $4$ processes that share $16$ instances of the same resource type. Each process can request a maximum of $K$ instances. Resources can be requested and released only one at a time. The largest value of $K$ that will always avoid deadlock is:

2 Answers

1 1 vote

The maximum number of resources that can be held by $N$ processes without causing a deadlock is given by the formula:

$$
\text { Max Held Resources }<R
$$

$$
\mathbf{4 \times(K-1) + 1 \leq 16}
$$

$$
\begin{aligned}
& K-1 \leq \frac{15}{4} \\\\
& K-1 \leq 3.75
\end{aligned}
$$
$$
K \leq 4.75
$$


Since $K$ must be an integer (number of resource instances), the largest integer value of $K$ that satisfies this condition is $\mathbf{4}$.

Answer:
Position:
Show:

Related questions

2 2 votes
3 3 answers
372
372 views
GO Classes asked Dec 16, 2025
372 views
Consider a system with a pool of $\mathbf{20}$ instances of a single resource type. Each process can request a maximum of $\mathbf{5}$ instances. To guarantee that the sy...
2 2 votes
4 4 answers
454
454 views
GO Classes asked Dec 16, 2025
454 views
Consider the following C program snippet :#include <stdio.h #include <unistd.h #include <sys/wait.h void main() & int i; for (i = 0; i < 3; i++) { if (for...
2 2 votes
3 3 answers
452
452 views
GO Classes asked Dec 16, 2025
452 views
In a system, there are three types of resources: $\mathbf{P}, \mathbf{Q}$, and $\mathbf{R}$. Four processes, $T_1, T_2, T_3$, and $T_4$ execute concurrently. At the outse...
2 2 votes
3 3 answers
468
468 views
GO Classes asked Dec 16, 2025
468 views
In a system, there are four types of resources: $\mathbf{R 1}, \mathbf{R 2}, \mathbf{R 3}$, and $\mathbf{R 4}$. Three processes, $P_1, P_2$, and $P_3$ execute concurrentl...