{"id":25185891,"url":"https://github.com/mazensayed91/bankersalgorithm","last_synced_at":"2025-06-30T05:04:05.452Z","repository":{"id":111421818,"uuid":"369180823","full_name":"Mazensayed91/BankersAlgorithm","owner":"Mazensayed91","description":null,"archived":false,"fork":false,"pushed_at":"2021-06-04T19:57:26.000Z","size":86897,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T08:47:31.874Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mazensayed91.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-20T11:13:40.000Z","updated_at":"2021-06-04T19:57:29.000Z","dependencies_parsed_at":"2023-03-13T13:40:15.142Z","dependency_job_id":null,"html_url":"https://github.com/Mazensayed91/BankersAlgorithm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mazensayed91/BankersAlgorithm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mazensayed91%2FBankersAlgorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mazensayed91%2FBankersAlgorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mazensayed91%2FBankersAlgorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mazensayed91%2FBankersAlgorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mazensayed91","download_url":"https://codeload.github.com/Mazensayed91/BankersAlgorithm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mazensayed91%2FBankersAlgorithm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262714507,"owners_count":23352463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-09T19:40:48.827Z","updated_at":"2025-06-30T05:04:05.421Z","avatar_url":"https://github.com/Mazensayed91.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BankersAlgorithm\n\nThe 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.\n\n# How to use [Method 1]\n\n - clone the repo\n - run this command from the terminal or simply install numpy =\u003e \"pip install -r requirements.txt\"\n - run this command from the terminal \"python app.py\"\n - ![image](https://user-images.githubusercontent.com/54520113/118970698-cc4be880-b96e-11eb-973a-2a6f48ba4077.png) : ex : \"0 0 1 2,1 0 0 0,1 3 5 4,0 6 3 2,0 0 1 4\"\n - ![image](https://user-images.githubusercontent.com/54520113/118970747-dec62200-b96e-11eb-9deb-b8f91e6a87c9.png) : ex : \"0 0 1 2,1 7 5 0,2 3 5 6,0 6 5 2,0 6 5 6\"\n - ![image](https://user-images.githubusercontent.com/54520113/118970793-ebe31100-b96e-11eb-80bc-8fb8301e5f14.png) : ex : \"3 4 3 2\"\n - Then the need matrix will be printed and you will be asked if you want to know if the state is safe or not\n - ![image](https://user-images.githubusercontent.com/54520113/118971130-53995c00-b96f-11eb-9a80-42b67d74e4ea.png)\n - if you clicked 1 : ![image](https://user-images.githubusercontent.com/54520113/118971162-601db480-b96f-11eb-95da-1a7d76ea6ec5.png)\n - Then you can click 1 again if you want to know if an immediate request could be granted\n - first enter the process number : ![image](https://user-images.githubusercontent.com/54520113/118971239-7592de80-b96f-11eb-9960-c063241e4670.png)\n - Then the request : ![image](https://user-images.githubusercontent.com/54520113/118971376-a1ae5f80-b96f-11eb-9b7f-55c197ef52f2.png)\n\n# How to use [Method 2]\n\nSimply download app folder and run app.exe\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazensayed91%2Fbankersalgorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmazensayed91%2Fbankersalgorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazensayed91%2Fbankersalgorithm/lists"}