Abstract
Most published concurrent data structures which avoid locking do not provide any fairness guarantees. That is, they allow processes to access a data structure and complete their operations arbitrarily many times before some other trying process can complete a single operation. Such a behavior can be prevented by enforcing fairness. However, fairness requires waiting or helping. Helping techniques are often complex and memory consuming. Does it mean that for enforcing fairness it is best to use locks? The answer is negative. We show that it is possible to automatically transfer any non-blocking or wait-free data structure into a similar data structure which satisfies a strong fairness requirement, without using locks and with limited waiting. The fairness we require is that no beginning process can complete two operations on a given resource while some other process is kept waiting on the same resource. Our approach allows as many processes as possible to access a shared resource at the same time as long as fairness is preserved. To achieve this goal, we introduce and solve a new synchronization problem, called fair synchronization. Solving the new problem enables us to add fairness to existing implementations of concurrent data structures, and to transform any solution to the mutual exclusion problem into a fair solution.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Adve, S.V., Gharachorloo, K.: Shared memory consistency models: A tutorial. IEEE Computer 29(12), 66–76 (1996)
Afek, Y., Stupp, G., Touitou, D.: Long-lived adaptive collect with applications. In: Proc. 40th IEEE Symp. on Foundations of Computer Science, pp. 262–272 (October 1999)
Anderson, J.H., Moir, M.: Using k-exclusion to implement resilient, scalable shared objects. In: Proc. 14th ACM Symp. on Principles of Distributed Computing, pp. 141–150 (August 1994)
Anderson, J.H., Moir, M.: Using local-spin k-exclusion algorithms to improve wait-free object implementations. Distributed Computing 11 (1997)
Burns, J.E., Lynch, A.N.: Mutual exclusion using indivisible reads and writes. In: 18th Annual Allerton Conference on Communication, Control and Computing, pp. 833–842 (October 1980)
Burns, J.N., Lynch, N.A.: Bounds on shared-memory for mutual exclusion. Information and Computation 107(2), 171–184 (1993)
Courtois, P.L., Heyman, F., Parnas, D.L.: Concurrent control with Readers and Writers. Communications of the ACM 14(10), 667–668 (1971)
Dijkstra, E.W.: Solution of a problem in concurrent programming control. Communications of the ACMÂ 8(9), 569 (1965)
Easton, W.B.: Process synchronization without long-term interlock. In: Proc. of the 3rd ACM Symp. on Operating Systems Principles, pp. 95–100 (1971)
Fich, F.E., Luchangco, V., Moir, M., Shavit, N.N.: Obstruction-free algorithms can be practically wait-free. In: Fraigniaud, P. (ed.) DISC 2005. LNCS, vol. 3724, pp. 78–92. Springer, Heidelberg (2005)
Fich, F.E., Hendler, D., Shavit, N.: On the inherent weakness of conditional synchronization primitives. In: Proc. 23rd ACM Symp. on Principles of Distributed Computing, pp. 80–87 (2004)
Fischer, M.J., Lynch, N.A., Burns, J.E., Borodin, A.: Distributed FIFO allocation of identical resources using small shared space. ACM Trans. on Programming Languages and Systems 11(1), 90–114 (1989)
Fischer, M.J., Lynch, N.A., Burns, J.E., Borodin, A.: Resource allocation with immunity to limited process failure. In: Proc. 20th IEEE Symp. on Foundations of Computer Science, pp. 234–254 (October 1979)
Fomitchev, M., Ruppert, E.: Lock-free linked lists and skip lists. In: Proc. 23rd ACM Symp. on Principles of Distributed Computing, pp. 50–59 (2004)
Harris, T.L.: A pragmatic implementation of non-blocking linked-lists. In: Welch, J.L. (ed.) DISC 2001. LNCS, vol. 2180, pp. 300–314. Springer, Heidelberg (2001)
Hart, T.E., McKenney, P.E., Brown, A.D.: Making lockless synchronization fast: Performance implications of memory reclamation. In: Proc. of the 20th International Parallel and Distributed Processing Symp. (2006)
Herlihy, M.P.: Wait-free synchronization. ACM Trans. on Programming Languages and Systems 13(1), 124–149 (1991)
Herlihy, M.P., Luchangco, V., Moir, M.: Obstruction-free synchronization: Double-ended queues as an example. In: Proc. of the 23rd International Conference on Distributed Computing Systems, p. 522 (2003)
Herlihy, M.P., Wing, J.M.: Linearizability: a correctness condition for concurrent objects. Toplas 12(3), 463–492 (1990)
Katseff, H.P.: A new solution to the critical section problem. In: Proc. 10th ACM Symp. on Theory of Computing, pp. 86–88 (May 1978)
Lamport, L.: A new solution of Dijkstra’s concurrent programming problem. Communications of the ACM 17(8), 453–455 (1974)
Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. on Computers 28(9), 690–691 (1979)
Lamport, L.: The mutual exclusion problem: Part II – statement and solutions. Journal of the ACM 33, 327–348 (1986)
Lamport, L.: A fast mutual exclusion algorithm. ACM Trans. on Computer Systems 5(1), 1–11 (1987)
Lycklama, E.A., Hadzilacos, V.: A first-come-first-served mutual exclusion algorithm with small communication variables. ACM Trans. on Programming Languages and Systems 13(4), 558–576 (1991)
Massalin, H., Pu, C.: A lock-free multiprocessor OS kernel. Technical Report CUCS-005-91, Columbia University (1991)
Michael, M.M., Scott, M.L.: Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In: Proc. 15th ACM Symp. on Principles of Distributed Computing, pp. 267–275 (1996)
Peterson, G.L.: New bounds on mutual exclusion problems. Technical Report TR68, University of Rochester (February 1980) (Corrected, November 1994)
Raynal, M.: Concurrent Programming: Algorithms, Principles, and Foundations, 515 pages. Springer (2013) ISBN 978-3-642-32027-9
Raynal, M.: Algorithms for mutual exclusion. The MIT Press (1986); Translation of: Algorithmique du parallélisme (1984)
Sundell, H., Tsigas, P.: Lock-free and practical doubly linked list-based deques using single-word compare-and-swap. In: Higashino, T. (ed.) OPODIS 2004. LNCS, vol. 3544, pp. 240–255. Springer, Heidelberg (2005)
Taubenfeld, G.: Synchronization Algorithms and Concurrent Programming, 423 pages. Pearson/Prentice-Hall (2006) ISBN 0-131-97259-6
Taubenfeld, G.: The black-white bakery algorithm and related bounded-space, adaptive, local-spinning and FIFO algorithms. In: Guerraoui, R. (ed.) DISC 2004. LNCS, vol. 3274, pp. 56–70. Springer, Heidelberg (2004)
Taubenfeld, G.: Efficient transformations of obstruction-free algorithms into non-blocking algorithms. In: Pelc, A. (ed.) DISC 2007. LNCS, vol. 4731, pp. 450–464. Springer, Heidelberg (2007)
Taubenfeld, G.: Contention-sensitive data structures and algorithms. In: Keidar, I. (ed.) DISC 2009. LNCS, vol. 5805, pp. 157–171. Springer, Heidelberg (2009)
Taubenfeld, G.: Fair Synchronization, 2013. The full version is http://www.faculty.idc.ac.il/gadi/Publications.htm
Valois, J.D.: Implementing lock-free queues. In: Proc. of the 7th International Conference on Parallel and Distributed Computing Systems, pp. 212–222 (1994)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Taubenfeld, G. (2013). Fair Synchronization. In: Afek, Y. (eds) Distributed Computing. DISC 2013. Lecture Notes in Computer Science, vol 8205. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-41527-2_13
Download citation
DOI: https://doi.org/10.1007/978-3-642-41527-2_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-41526-5
Online ISBN: 978-3-642-41527-2
eBook Packages: Computer ScienceComputer Science (R0)