Implementation of Token Ring and Ricart agrawala algorithms