Question: Deadlock Bankers Algorithm A system has three resource types (A, B, C) and four processes {P1, P2, P3, P4 }. The total units of system

Deadlock Bankers Algorithm

A system has three resource types (A, B, C) and four processes {P1, P2, P3, P4 }. The total units of system resources are: (8, 5, 4) units of A, B and C, respectively. The maximum demands for each process is P1(1,2,3), P2(3,2,1), P3(6,5,4) and P4(4,4,2). The current allocation is: P1(0,1,1), P2(2,2,0) and P3(3,0,1) and P4(1,0,1).

(a) Allocation table is given for the 3 processes with the following four columns: PROCESS, ALLOCATION, MAX and NEED. And fill this table with the current allocation state.

(b) Is this state a safe state? Explain your answer by identifying a successful future sequence of processes that makes the state safe, or by explaining which processes are part of the problem that makes the state unsafe?

PROCESS ALLOCATION MAX NEED

A B C A B C A B C

* P0 4 5 0 1 3 6 3 2 6 (*P0 is just an example)

P1 0 1 1 1 2 3

P2 2 2 0 3 2 1

P3 3 0 1 6 5 4

P4 1 0 1 4 4 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!