Implementation of Ricart Agrawala algorithm with Roucairol Carvalho optimization for mutual exclusion in distributed systems