3 3 votes A system has $4$ copies of resource $R$. There are $n$ processes, and each process requires at most $2$ copies of resource $R$ to complete its execution.Which of the following statements is/are TRUE?THE SYSTEM IS GUARANTEED TO BE DEADLOCK-FREE IF $N=3$. THE SYSTEM IS GUARANTEED TO BE DEADLOCK-FREE IF $N=4$. THE MAXIMUM NUMBER OF PROCESSES THE SYSTEM CAN SUPPORT WITHOUT ANY POSSIBILITY OF DEADLOCK IS $3$. IF $N=5$, A DEADLOCK IS CERTAIN TO OCCUR. Operating System goclasses operating-system goclasses-cs-dpp goclasses-cs-dpp-day-198 goclasses-os-practice-questions multiple-selects + – GO Classes 322 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
3 3 votes $$\begin{gathered}n(2-1)<4 \\n(1)<4 \\n<4\end{gathered}$$This means the system is guaranteed to be deadlock-free if the number of processes $n$ is $\mathbf{3}$ or fewer.THE SYSTEM IS GUARANTEED TO BE DEADLOCK-FREE IF $N=3$ : TRUE. As calculated, $n=3$ satisfies the condition $n<4$. Even in the worst-case scenario where each of the $3$ processes holds $1$ resource $($Total $= 3)$, there is still $1$ resource left in the pool to satisfy any process's request for a second copy. THE SYSTEM IS GUARANTEED TO BE DEADLOCK-FREE IF $N=4$ : FALSE. If $n=4$ , it is possible for each process to hold $1$ resource. At this point, all 4 resources are exhausted. Each process will then wait for a second resource that will never become available. This is a deadlock state. THE MAXIMUM NUMBER OF PROCESSES THE SYSTEM CAN SUPPORT WITHOUT ANY POSSIBILITY OF DEADLOCK IS $\mathbf{3}$: TRUE. This is the direct result of our inequality $n<4$. If $n$ increases to $4$, the "guarantee" of being deadlock-free disappears. IF $N=5$, A DEADLOCK IS CERTAIN TO OCCUR: FALSE. In GATE questions, "certain to occur" is a very strong claim. While deadlock is possible if $n=5$, it is not certain. If one process finishes its execution and releases its resources before the others hit their peak demand, the system can still complete all tasks without deadlocking. GO Classes answered Feb 16 GO Classes comment Share Follow See 1 comment 1 1 comment reply mikasa_ackermann commented Feb 17 reply Follow flag nice question. please keep uploading everyday its helpful 1 1 replyShare Please log in or register to add a comment.
0 0 votes For Single resource type, with:m total instancesn processesEach process needs at most k instancesThen, The system is guaranteed deadlock-free if: m ≥ n ( k − 1 ) + 1here m=4 , k=2 so n<=3 So A and C are True Kr1shnakant answered Feb 18 Kr1shnakant comment Share Follow 0 reply Please log in or register to add a comment.