Implementation of Maekawa's distributed algorithm