Implementation of Maekawa's Distributed Algorithm.