A Scalable Elimination-based Exchange Channel

We present a new nonblocking implementation of the exchange channel, a concurrent data structure in which 2N participants form N pairs and each participant exchanges data with its partner. Our new implementation combines techniques from our previous work in dual stacks and from the elimination-based stack of Hendler et al. to yield very high concurrency. We assess the performance of our exchange channel using experimental results from a 16-processor SunFire 6800. We compare our implementation to that of the Java SE 5.0 class java.util.concurrent.Exchanger using both a synthetic microbenchmark and a real-world application that finds an approximate solution to the traveling salesman problem using genetic recombination. Our algorithm outperforms the Java SE 5.0 Exchanger in the microbenchmark by a factor of two at two threads up to a factor of 50 at 10; similarly, it outperforms the Java SE 5.0 Exchanger by a factor of five in the traveling salesman problem at ten threads. Our exchanger has been adopted for inclusion in Java 6.