639 views

2 Answers

0 votes
0 votes
just take the prior knowledge of DAG representation means which one is requesting edge which one is allocated edge ... like this one

and construct the table which u are asking for ,but without table we can also solve just using the basic knowledge of DAG

for example p1 has two allocated edges 1 insatnce of R1 and one of R3 is allocated to it .and p1 has one requesting edge requestiong for one instance ogf R3........simlarly do for all
0 votes
0 votes
if you are comfortable with tables, just make the diagram into table...

in that case, there is only allocated matrix and need matrix but there is no Maximum demand matrix

out going edges from a process should represent remaining need resources and

incoming edges to the process should represent allocated resources

 

                       allocated                             need

                    R1      R2    R3                  R1     R2      R3

P1                1         0       1                   0         0         1

P2                1         1       0                   0         1         1

P3                0         1       1                   0         1         0

P4                0         0       0                   0         1         1

---------------------------------------------------------------------------

Allocated     2            2        2

Total           2             3        2

------------------------------------------

Available     0            1        0

 

 

i can complete P3, ===> Available     0            2        1

now i can complete any processes ===> More than one safe sequence exist

Related questions

2 votes
2 votes
2 answers
1
Sunnidhya Roy asked Dec 30, 2022
678 views
Can Safe state in DeadLock Avoidance Mechanism always guarantee No DeadLock??
0 votes
0 votes
1 answer
2
0 votes
0 votes
3 answers
4
Vegeta asked Oct 22, 2018
911 views
All safe states are deadlock free. But we can go to deadlock with some combination of sequence? So if the question is, from the safe state can we enter deadlock? Ans shou...