Banker’s Algorithm

Q1. Explain Banker’s Algorithm.

Q2. Consider the table given below for a system, find the need matrix and the safety sequence, is the request from process P1(0, 1, 2) can be granted immediately.

Resource – 3 types

A – (10 instances)

B – (5 instances)

C – (7 instances)

Process Allocation Maximum Available Need
P0
P1
P2
P3
P4
A B C
0 1 0
2 0 0
3 0 2
2 1 1
0 0 2
A B C
7 5 3
3 2 2
9 0 2
2 2 2
4 3 3
A B C
3 3 2
A B C
7 4 3
1 2 2
6 0 0
0 1 1
4 3 1

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: