Question
A system has three resources R1,R2,R3, with total
instances 5, 3, and 4, respectively. Processes P1,P2,P3 are allocated (2, 1, 2), (1, 1, 1), and (1, 1, 2). The remaining needs are (1, 1, 1), (1, 1, 2), and (1, 1, 0). Can the system avoid deadlock?Solution
Using the Bankerâs Algorithm, we determine if the system can execute all processes without entering a deadlock. 1. Available resources initially: R1=1,R2=0,R3=0 2. If P1 finishes first, it releases R1=2,R2=1,R3=2. Available becomes R1=3,R2=1,R3=2. 3. Now P2 can execute, releasing R1=1,R2=1,R3=1. Available becomes R1=4,R2=2,R3=3. 4. Finally, P3 completes, releasing all its resources. Hence, no deadlock occurs if P1 is completed first. Why Other Options Are Incorrect: ⢠B) No, deadlock is inevitable: Incorrect because deadlock can be avoided by choosing the correct execution order. ⢠C) & D): Incorrect as P2 or P3 cannot execute first due to insufficient resources. ⢠E) Insufficient data: Incorrect as the problem provides all necessary data.
Which of the following banks has launched “Salute Doctors” on the National Doctors Day which is held on 1st July every year?
Who assassinated Michael O'Dwyer to avenge the Jallianwala Bagh Massacre?
Consider the following statements in relation to Biosphere Reserves:
1. Initiated by UNESCO in 1973-74 under its Man and Biosphere (MAB) Programm...
Which one of the following Islands, is known as ârice bowlâ of Japan?
Which organization developed the 'Akashteer Air Defence System'?
Which of the following is not correct about ARR method?
Miraj, known for its GI-tagged 'Sitars' and 'Tanpuras,' is in which Indian state?
In regards to Mountains in Uttarakhand, which of the following is not correctly matched?
Which type of soil is known for providing valuable building material?
The Equator is an imaginary line which passes through which of the following countries?
a) Uganda
b) San Sao Tome and PrĂncipe
c) ...