Resource-Request Algorithm (The Bankers Algorithm)
1. If Request[ i ] > Need[ i ] for any process i, raise an error condition
2. If Request[ i ] > Available for any process i, then that process must wait for resources to become available
3. Check to see if the request can be granted safely, by pretending it has been granted and then seeing if the resulting state is safe. If so, grant the request, and if not, then the process must wait until its request can be granted safely
4. Available = Available - Request
5. Allocation = Allocation + Request