## Bankers Algorithm

Edit

### Procedure to solve Banker’s algorithm :-

Edit

a) Problem must provide Allocation matrix, Maximum matrix and resource given to operating system

b) Initially calculate need matrix

Need matrix = Maximum matrix – allocated matrix

c) Calculated available resources by subtracting allocated resources from total number of resources.

d) Compare available resources with need resources.

If available resource > need resource.

That process will be executed and after completion of process it will release all its allocated resource for next process.

Available resource   =  allocated resource + previous available resource . Do this till last process.

e) If available resource < need resource, then go to check for next process. After going through all process we will get safe sequence of execution.

### Numericals

Edit

Q. Find out the safe sequence for execution of 4 process using bankers algorithm.Maximum resources ( R1 = 5, R2 = 5 )                                     ( Dec.2016 )     6 M

Q      Find the safe sequence for execution of 3 process using banker’s algorithm maximum resources :R1  = 7 , R2 = 7 , R3  = 10   ( May -2016 )

## References

Edit
• WikiNote Foundation

Last modified: Friday, 20 September 2019, 10:30 AM