352 views
3 3 votes

A system has $4$ processes $(P_1$ to $P_4)$ and $10$ instances of a single resource type $R$. Each process requires a maximum of $m$ instances to complete. What is the MAXIMUM value of $m$ such that the system is guaranteed to be deadlock-free, regardless of the order in which processes request and release resources?

2 Answers

2 2 votes
\begin{aligned}
&\text {To ensure a system is guaranteed to be deadlock-free, the total resources } R \text { must satisfy: }\\\\
&R \geq \sum\left(\text { Max_Need }_i-1\right)+1\\\\
& 10 \geq 4(m-1)+1 \\\\
& 10 \geq 4 m-4+1 \\\\
& 10 \geq 4 m-3 \\\\
& 13 \geq 4 m \\\\
& m \leq 3.25
\end{aligned}
$\text { Since } m \text { must be an integer, the maximum value is } 3 \text {. }$
Answer:
Position:
Show:

Related questions

6 6 votes
2 2 answers
476
476 views
GO Classes asked Feb 28
476 views
Consider a uniprocessor system with three processes $\mathrm{P1, P2,}$ and $\mathrm{P3}$ arriving at time $\mathrm{t}=0$. Their burst times are $10,20 ,$ and $30$ units, ...
7 7 votes
1 1 answer
531
531 views
GO Classes asked Feb 28
531 views
Consider a system employing demand paging. The system's performance is being analyzed under heavy load, and it is observed that the CPU utilization is very low while the ...
4 4 votes
1 1 answer
416
416 views
GO Classes asked Feb 28
416 views
A computer system uses $46$-bit virtual addresses and $32$-bit physical addresses with a page size of $8\mathrm{~KB}$. If the system employs a $\mathbf{3}$-level hierarch...
5 5 votes
1 1 answer
353
353 views
GO Classes asked Feb 28
353 views
Two processes, $A$ and $B$, share a counting semaphore $\verb|S|$ initialized to $2$. Each process executes the following code segment exactly once:wait(S); /* Critical S...