bajajvinamr / HacktoberFest2020

Make your first PR! ~ A beginner-friendly repository. Add your profile, a blog, or any program under any language (it can be anything from a hello-world program to a complex data structure algorithm) or update the existing one. Just make sure to add the file under the correct directory. Happy hacking!
152 stars 685 forks source link

Create Banker's Algo Implementation #1006

Open muskan-sudo opened 3 years ago

muskan-sudo commented 3 years ago

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. In this code, it checks for the safe sequence of the processes to avoid deadlock and also let us know if no sequence is possible.