Simulation of the Ricart and Agrawala distributed systems algorithm