0
1.2kviews
Consider the given snap of the system
PROCESS Max Allocation Available
--- A B A B A B
--- C D C D C D
P0 0 2 0 3 2 5
--- 1 2 2 2 3 2
P1 1 1 2 7 ---
--- 0 2 5 2 ---
P2 2 2 2 3 ---
--- 5 4 7 6 ---
P3 0 3 1 6 ---
--- 1 2 4 2 ---
P4 2 4 3 6 ---
--- 1 4 5 8 ---

Answer the following questions using bankers algorithm

i)what is the content of matrix needed?

ii)is the system in safe state?

iii)if a request for p1 arrives for (1,3,2,1) can the request be granted immediately?

Subject: Operating System

Topic: PROCESS COORDINATION

Difficulty: Hard

1 Answer
0
3views
  1. Need [i,j] = Max[i,j] - Allocation[i,j]

So content of need matrix is

A B C D
P0 0 1 1 0
P1 1 6 5 0
P2 0 1 2 2
P3 1 3 3 0
P4 1 2 4 4
  1. Yes the system is safe and sequence (P0, P2, …

Create a free account to keep reading this post.

and 3 others joined a min ago.

Please log in to add an answer.