ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU class(2019-2020-1) > student directories > 2017329621045-牟惠麟 >
homework-5 2017329621045 Version 0
👤 Author: by mhl0414163com 2019-10-26 10:27:17
describe your understadings about Banker's Algorithm, and give your own demo example.

 

The banker algorithm is a detection algorithm that avoids deadlocks, simulates the maximum value of running allocations, and allocates resources after ensuring program security.

 

Allocation   Max    Available

ABCD    ABCD  ABCD

P1   0014    0656  1520

P2  1432    1942

P3  1354    1356

P4  1000    1750

 

NEED     Available

ABCD   ABCD

P1 0642   1520

P2 0510

P3 0002

P4 0750

 

NEED     Available

ABCD  ABCD

P1 0642  1520

P2 0000 +1432

P3 0002-------

P4 0750  2952

 

P2 IS TRUE

 

NEED      Available

ABCD  A B C D

P1 0642  2 9 5 2

P2 0000 +1 3 5 4

P3 0000----------

P4 0750  3 12 10 6

 

P3 IS TRUE

NEED      Available

ABCD  A B C D

P1 0642  3 12 10 6

P2 0000 +1 0 0 0

P3 0000----------

P4 0000  4  12 10 6

 

P4 IS TRUE

NEED      Available

ABCD  A B C D

P1 0000  4 12 10 6

P2 0000 +0  0  1  4

P3 0000----------

P4 0000  4  12 11 10

 

P1 IS TRUE

Please login to reply. Login

Reversion History

Loading...
No reversions found.