Why Non-blocking Operations Should be Selfish

  • Joel Gibson
  • Vincent Gramoli
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9363)


Non-blocking data structures are often analysed by giving an upper amortised running time bound in terms of the size of the data structure and a measure of contention. The two most commonly used measures are the point contention \(c_P\), the maximum number of processes active at any one time during an operation, and the interval contention \(c_I\), the number of operations overlapping with a given operation. In this paper, we show that when summed across every operation in an execution, the interval contention \(c_I\) is within a factor of 2 of the point contention \(c_P\). Our proof relies on properties of interval graphs where at least one simplicial vertex exists, and uses it to construct a lower bound on the overall point contention. We show that this bound is tight.

This result contradicts the folklore belief that point contention leads to a tighter bound on complexity in an amortised context, and provides some theoretical grounds for recent observations that using less helping in non-blocking data structures can lead to better performance. We also propose a linked list algorithm based on Fomitchev and Ruppert’s algorithm but with selfish operations: read-only operations that do not help others but rather execute wait-free. The higher performance of our approach compared to the original list confirms that reducing helping can increase performance, with the same asymptotic amortised complexity.


Helping Lock-freedom Wait-freedom Point contention Process contention Interval contention Overlapping-interval contention 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Herlihy, M.: Wait-free synchronization. ACM Trans. Program. Lang. Syst. 13(1), 124–149 (1991)CrossRefGoogle Scholar
  2. 2.
    Censor-Hillel, K., Petrank, E., Timnat, S.: Help! In: PODC, pp. 241–250 (2015)Google Scholar
  3. 3.
    Gramoli, V.: More than you ever wanted to know about synchronization: Synchrobench, measuring the impact of the synchronization on concurrent algorithms. In: PPoPP, pp. 1–10 (2015)Google Scholar
  4. 4.
    Attiya, H., Fouren, A.: Algorithms adapting to point contention. J. ACM 50(4), 444–468 (2003)MathSciNetCrossRefGoogle Scholar
  5. 5.
    Fomitchev, M., Ruppert, E.: Lock-free linked lists and skip lists. In: PODC, pp. 50–59 (2004)Google Scholar
  6. 6.
    Oshman, R., Shavit, N.: The SkipTrie: low-depth concurrent search without rebalancing. In: PODC, pp. 23–32 (2013)Google Scholar
  7. 7.
    Chatterjee, B., Nguyen, N., Tsigas, P.: Efficient lock-free binary search trees. In: PODC, pp. 322–331 (2014)Google Scholar
  8. 8.
    Ellen, F., Fatourou, P., Helga, J., Ruppert, E.: The amortized complexity of non-blocking binary search trees. In: PODC, pp. 332–340 (2014)Google Scholar
  9. 9.
    Afek, Y., Stupp, G., Touitou, D.: Long lived adaptive splitter and applications. Distributed Computing 15(2), 67–86 (2002)CrossRefGoogle Scholar
  10. 10.
    David, T., Guerraoui, R., Trigonakis, V.: Asynchronized concurrency: the secret to scaling concurrent search data structures. In: ASPLOS, pp. 631–644 (2015)Google Scholar
  11. 11.
    Heller, S., Herlihy, M.P., Luchangco, V., Moir, M., Scherer III, W.N., Shavit, N.N.: A lazy concurrent list-based set algorithm. In: Anderson, J.H., Prencipe, G., Wattenhofer, R. (eds.) OPODIS 2005. LNCS, vol. 3974, pp. 3–16. Springer, Heidelberg (2006) CrossRefGoogle Scholar
  12. 12.
    Herlihy, M., Shavit, N.: The Art of Multiprocessor Programming. Morgan Kaufmann Publishers Inc., San Francisco (2008)Google Scholar
  13. 13.
    Michael, M.M.: High performance dynamic lock-free hash tables and list-based sets. In: SPAA, pp. 73–82 (2002)Google Scholar
  14. 14.
    Dwork, C., Herlihy, M., Waarts, O.: Contention in shared memory algorithms. J. ACM 44(6), 779–805 (1997)zbMATHMathSciNetCrossRefGoogle Scholar
  15. 15.
    Attiya, H., Guerraoui, R., Kouznetsov, P.: Computing with reads and writes in the absence of step contention. In: Fraigniaud, P. (ed.) DISC 2005. LNCS, vol. 3724, pp. 122–136. Springer, Heidelberg (2005) CrossRefGoogle Scholar
  16. 16.
    Hendler, D.: Non-blocking algorithms. In: Encyclopedia of Parallel Computing. Springer, pp. 1321–1329 (2011)Google Scholar
  17. 17.
    Taubenfeld, G.: Contention-sensitive data structures and algorithms. In: Keidar, I. (ed.) DISC 2009. LNCS, vol. 5805, pp. 157–171. Springer, Heidelberg (2009) CrossRefGoogle Scholar
  18. 18.
    Crain, T., Gramoli, V., Raynal, M.: A speculation-friendly binary search tree. In: PPoPP, pp. 161–170 (2012)Google Scholar
  19. 19.
    Crain, T., Gramoli, V., Raynal, M.: A contention-friendly binary search tree. In: Wolf, F., Mohr, B., an Mey, D. (eds.) Euro-Par 2013. LNCS, vol. 8097, pp. 229–240. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  20. 20.
    Brown, T., Ellen, F., Ruppert, E.: A general technique for non-blocking trees. In: PPoPP, pp. 329–342 (2014)Google Scholar
  21. 21.
    Crain, T., Gramoli, V., Raynal, M.: No hot spot non-blocking skip list. In: ICDCS, pp. 196–205 (2013)Google Scholar
  22. 22.
    Dick, I., Fekete, A., Gramoli, V.: Logarithmic data structures for multicores. Technical Report 697, University of Sydney (2014)Google Scholar
  23. 23.
    Valois, J.D.: Lock-free linked lists using compare-and-swap. In: PODC, pp. 214–222 (1995)Google Scholar
  24. 24.
    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) CrossRefGoogle Scholar
  25. 25.
    Gramoli, V., Kuznetsov, P., Ravi, S., Shang, D.: Brief announcement: a concurrency-optimal list-based set. In: DISC. LNCS (2015)Google Scholar
  26. 26.
    Herlihy, M., Shavit, N.: On the nature of progress. In: Fernàndez Anta, A., Lipari, G., Roy, M. (eds.) OPODIS 2011. LNCS, vol. 7109, pp. 313–328. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  27. 27.
    Alistarh, D., Censor-Hillel, K., Shavit, N.: Are lock-free concurrent algorithms practically wait-free? In: STOC, pp. 714–723 (2014)Google Scholar
  28. 28.
    Kogan, A., Petrank, E.: A methodology for creating fast wait-free data structures. In: PPoPP, pp. 141–150 (2012)Google Scholar
  29. 29.
    Timnat, S., Petrank, E.: A practical wait-free simulation for lock-free data structures. In: PPoPP, pp. 357–368 (2014)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  1. 1.University of SydneySydneyAustralia
  2. 2.NICTASydneyAustralia

Personalised recommendations