On the cost of composing shared-memory algorithms

Decades of research in distributed computing have led to a variety of perspectives on what it means for a concurrent algorithm to be efficient, depending on model assumptions, progress guarantees, and complexity metrics. It is therefore natural to ask whether one could compose algorithms that perform efficiently under different conditions, so that the composition preserves the performance of the original components when their conditions are met. In this paper, we evaluate the cost of composing shared-memory algorithms. First, we formally define the notion of safely composable algorithms and we show that every sequential type has a safely composable implementation, as long as enough state is transferred between modules. Since such generic implementations are inherently expensive, we present a more general light-weight specification that allows the designer to transfer very little state between modules, by taking advantage of the semantics of the implemented object. Using this framework, we implement a composed long-lived test-and-set object, with the property that each of its modules is asymptotically optimal with respect to the progress condition it ensures, while the entire implementation only uses objects with consensus number at most two. Thus, we show that the overhead of composition can be negligible in the case of some important shared-memory abstractions.

[1]  B. E. Eckbo,et al.  Appendix , 1826, Epilepsy Research.

[2]  Marcos K. Aguilera,et al.  Abortable and query-abortable objects and their efficient implementation , 2007, PODC '07.

[3]  Maurice Herlihy,et al.  Linearizability: a correctness condition for concurrent objects , 1990, TOPL.

[4]  Oded Goldreich,et al.  The Best of Both Worlds: Guaranteeing Termination in Fast Randomized Byzantine Agreement Protocols , 1990, Inf. Process. Lett..

[5]  Marko Vukolic,et al.  Abstractions for asynchronous distributed computing with malicious players , 2008 .

[6]  Rachid Guerraoui,et al.  The complexity of obstruction-free implementations , 2009, JACM.

[7]  Prasad Jayanti,et al.  Adaptive and efficient abortable mutual exclusion , 2003, PODC '03.

[8]  Rachid Guerraoui,et al.  Deconstructing paxos , 2003, SIGA.

[9]  Stephen A. Edwards,et al.  Simple and fast biased locks , 2010, 2010 19th International Conference on Parallel Architectures and Compilation Techniques (PACT).

[10]  Yehuda Afek,et al.  Wait-free Test-and-Set (Extended Abstract) , 1992, WDAG.

[11]  Maurice Herlihy,et al.  Wait-free synchronization , 1991, TOPL.

[12]  Dan Alistarh,et al.  Generating Fast Indulgent Algorithms , 2011, ICDCN.

[13]  Yehuda Afek,et al.  Long lived adaptive splitter and applications , 2002, Distributed Computing.

[14]  Prasad Jayanti,et al.  A lower bound on the local time complexity of universal constructions , 1998, PODC '98.

[15]  Rachid Guerraoui,et al.  Speculative linearizability , 2012, PLDI.

[16]  Rachid Guerraoui,et al.  Laws of order: expensive synchronization in concurrent algorithms cannot be eliminated , 2011, POPL '11.

[17]  Rachid Guerraoui,et al.  The inherent price of indulgence , 2002, PODC '02.

[18]  Mark Moir,et al.  On the Uncontended Complexity of Consensus , 2003, DISC.