533 views
0 votes
0 votes
Maximum        allocation           available

      A B C D         A B C D           A B C D

p0  6 0 1 2          4 0 0 1             3 2 1 1

p1  2 7 5 0          1 1 0 0

p2  2 3 5 6          1 2 5 4

p3  1 6 5 3           0 6 3 3

p4  1 6 5 6           0 2 1 2

 

 

What is the total number of instances of each resource type?Find a safe sequence of given system

1 Answer

0 votes
0 votes

From given data ..

Max Requirement Allocated Need Matrix
6   0    1     2 4   0    0   1  2     0    1     1 
2   7    5     0 1    1   0   0  1     6     5    0 
2    3    5    6  1    2   5   4  1     1      0   2 
1    6     5   3  0    6    3   3   1      0     2    0 
1     6    5   6   0     2    1   2   1      4     4     4 

Now avaliable are 3 2 1 1 ..so we can satisfy only Process P0 ..so free resources are 7 2 1 2 

Now execute P2 so we get 8 4 6 6 resources .

Now  P4 we get 8 6 7 8 

then P3 we get  8 12 10 11 

Now P1 we get  9 13 10 11 

Related questions

2 votes
2 votes
3 answers
2
student2018 asked Apr 15, 2017
4,154 views
Here minimum no. of states 4 or 5(including dead state)
0 votes
0 votes
1 answer
3
Sanjay Sharma asked Sep 22, 2016
2,840 views
what is the difference between reject state and dead state in finite automata
1 votes
1 votes
3 answers
4
Mojo-Jojo asked Jan 3, 2016
1,432 views
If we are asked the number of states in minimum DFA, then we have to count dead state , right ?