Skip to content

Mazensayed91/BankersAlgorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BankersAlgorithm

The banker’s algorithm is a resource allocation and deadlock avoidance algorithm that tests for safety by simulating the allocation for predetermined maximum possible amounts of all resources, then makes an “s-state” check to test for possible activities, before deciding whether allocation should be allowed to continue.

How to use [Method 1]

  • clone the repo
  • run this command from the terminal or simply install numpy => "pip install -r requirements.txt"
  • run this command from the terminal "python app.py"
  • image : ex : "0 0 1 2,1 0 0 0,1 3 5 4,0 6 3 2,0 0 1 4"
  • image : ex : "0 0 1 2,1 7 5 0,2 3 5 6,0 6 5 2,0 6 5 6"
  • image : ex : "3 4 3 2"
  • Then the need matrix will be printed and you will be asked if you want to know if the state is safe or not
  • image
  • if you clicked 1 : image
  • Then you can click 1 again if you want to know if an immediate request could be granted
  • first enter the process number : image
  • Then the request : image

How to use [Method 2]

Simply download app folder and run app.exe

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors