edited by
1,374 views
0 votes
0 votes

Consider the following state of a system with four processes$, P1, P2, P3,$ and $P4,$ and five types of resources, $RS1, RS2, RS3, RS4,$ and $RS5:$

Using the deadlock detection algorithm described in Section $6.4.2,$ show that there is a deadlock in the system. Identify the processes that are deadlocked.

edited by

1 Answer

0 votes
0 votes
First, the set of unmarked processes, P = (P1 P2 P3 P4)

R1 is not less than or equal to A

R2 is less than A;  Mark P2; A = (0 2 0 3 1); P = (P1 P3 P4)

R1 is not less than or equal to A

R3 is equal to A; Mark P3; A = (0 2 0 3 2); P = (P1 P4)

R1 is not less than or equal to A

R4 is not less than or equal to A

So, processes P1 and P4 remain unmarked. They are deadlocked.

Source: Tanenbaum Solution Manual.

Related questions

0 votes
0 votes
0 answers
1
1 votes
1 votes
1 answer
3
0 votes
0 votes
0 answers
4
admin asked Oct 30, 2019
309 views
Consider Fig. 6-4. Suppose that in step $(o)\: C$ requested $S$ instead of requesting $R.$ Would this lead to deadlock? Suppose that it requested both $S$ and $R.$