Implementation Ricart and Agrawala's Algorithm