An implementation of the Banker's Algorithm in Erlang.