Implementation of Token Ring and Ricart agrawala algorithms in Ruby