International Journal of Parallel Programming

, Volume 17, Issue 1, pp 1–17 | Cite as

Two algorithms for barrier synchronization

  • Debra Hensgen
  • Raphael Finkel
  • Udi Manber
Article

Abstract

We describe two new algorithms for implementing barrier synchronization on a shared-memory multicomputer. Both algorithms are based on a method due to Brooks. We first improve Brooks' algorithm by introducing double buffering. Our dissemination algorithm replaces Brook's communication pattern with an information dissemination algorithm described by Han and Finkel. Our tournament algorithm uses a different communication pattern and generally requires fewer total instructions. The resulting algorithms improve Brook's original barrier by a factor of two when the number of processes is a power of two. When the number of processes is not a power of two, these algorithms improve even more upon Brooks' algorithm because absent processes need not be simulated. These algorithms share with Brooks' barrier the limitation that each of then processes meeting at the barrier must be assigned identifiersi such that 0≤i<n.

Key words

Barrier broadcast distributed parallel synchronization shared memory 

References

  1. 1.
    Eugene D. Brooks III, The Butterfly Barrier,International Journal of Parallel Programming 15:295–307 (1986).Google Scholar
  2. 2.
    Boris D. Lubachevsky, An Approach to Automating the Verification of Compact Parallel Coordination Programs,Acta Informatica, pp. 125–169 (1984).Google Scholar
  3. 3.
    Leslie Lamport, On the Correctness of Multiprocess Programs,IEEE Transactions on Software Engineering SE-3(2):125–143 (Match 1977).Google Scholar
  4. 4.
    Hugh C. Lauer and Roger M. Needham, On the Duality of Operating System Structures,Operating Systems Review, pp. 3–19 (April 1979). Originally printed in the Proceedings of the Second International Symposium on Operating Systems,IRIA (October 1978).Google Scholar
  5. 5.
    Yijie Han and Raphael Finkel, An Optimal Scheme for Disseminating Information, Technical Report 106-88, Computer Sciences Department, University of Kentucky (1988).Google Scholar
  6. 6.
    Y. Han and R. Finkel, An optimal scheme for disseminating information,Procedings of the 1988 International Conference on Parallel Processing II:198–203 (August, 1988).Google Scholar
  7. 7.
    N. Alon, A. Barak, and U. Manber, On Disseminating Information Reliably without Broadcasting,The 7th International Conference on Distributed Computing Systems, pp. 74–81 (September 1987).Google Scholar

Copyright information

© Plenum Publishing Corporation 1988

Authors and Affiliations

  • Debra Hensgen
    • 1
  • Raphael Finkel
    • 1
  • Udi Manber
    • 2
  1. 1.University of KentuckyLexington
  2. 2.University of ArizonaTucson

Personalised recommendations