Scalable concurrent counting

Maurice Herlihy, Beng-Hong Lim, Nir Shavit
1995 ACM Transactions on Computer Systems  
The notion of counting is central to a number of basic multiprocessor coordination problems, such as dynamic load balancing, barrier synchronization, and concurrent data structure design. In this paper, we i n vestigate the scalability o f a v ariety o f c o u n ting techniques for large-scale multiprocessors. We compare counting techniques based on: (1) spin locks, (2) message passing, (3) distributed queues, (4) software combining trees, and (5) counting networks. Our comparison is based on a
more » ... rison is based on a series of simple benchmarks on a simulated 64-processor Alewife machine, a distributed-memory multiprocessor currently under development at MIT. Although locking techniques are known to perform well on small-scale, bus-based multiprocessors, serialization limits performance and contention can degrade performance. Both counting networks and combining trees substantially outperform the other methods by a voiding serialization and alleviating contention, although combining tree throughput is more sensitive t o v ariations in load. A comparison of shared-memory and message-passing implementations of counting networks and combining trees shows that message-passing implementations have substantially higher throughput.
doi:10.1145/210223.210225 fatcat:ael7apg6ynfixfw4qghj4prere