.

Banker’s Algorithm Assignment Example

Example

  • 5 processes as well as 3 resource type i.e. A(with 10 instances), B(with 5 instances), and C(with 7 instances).
  • Is this is Safe sate?
Available
ABC
332
Allocation
ABC
P0010
P1200
P2302
P3211
P400
Max
ABC
753
322
902
222
433
  • 5 processes as well as 3 resource type i.e. A(with 10 instances), B(with 5 instances), and C(with 7 instances).
  • < P1, P3, P0, P2, P4 > is a safe sequence
Available
ABC
332
Allocation
ABC
P0010
P1200
P2302
P3211
P4002
Max
ABC
753
322
902
222
433
Need
ABC
743
122
600
011
431
  • Suppose P1 now request (1, 0, 2)
  • < P1, P3, P0, P2, P4 > is a safe sequence also in this case.
Available
ABC
230
Allocation
ABC
P0010
P1302
P2302
P3211
P4002
Max
ABC
753
322
902
222
433
Need
ABC
743
020
600
011
431
.