bhaveshlohana / HacktoberFest2020-Contributions

A beginner-friendly project to help you in open-source contributions. Made specifically for contributions in HACKTOBERFEST 2020! Hello World Programs and Algorithms! Please leave a star ⭐ to support this project! ✨
MIT License
189 stars 997 forks source link

Create Banker's Algorithm Implementation #1705

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 resources to avoid deadlock and also let us know if the sequence is not possible.