Erlang Implementation of Banker's Algorithm