1
63kviews
Numerical on Banker's algorithm
Process Max 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

Using Banker’s algorithm, answer the following questions:-

  • i) How many resources of type A, B, C, D are there?
  • ii) What are the contents of need matrix?
  • iii) Find if the system is in safe state? If it is, find the safe sequence.
1 Answer
3
8.4kviews

1)

A = 4+1+1+3 = 9

B = 1+2+6+2+2 = 13

C = 5+3+1+1 = 10

D = 1+4+3+2+1 = 11

2) Need matrix :

enter image description here

3) YES , system is in safe state

Safe Sequence: P0, P2, P3, P4, P1

Please log in to add an answer.