Deadlock –Banker’s Algorithm

Deadlock –Banker’s 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).

Don't use plagiarized sources. Get Your Custom Essay on
Deadlock –Banker’s Algorithm
Just from $8 /Page 0r 300 words
Order Now

(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.

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now

(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

Looking for a similar assignment? Get help from our qualified experts!

Order Now