skip to main content
research-article

Optimistic concurrency with OPTIK

Published:27 February 2016Publication History
Skip Abstract Section

Abstract

We introduce OPTIK, a new practical design pattern for designing and implementing fast and scalable concurrent data structures. OPTIK relies on the commonly-used technique of version numbers for detecting conflicting concurrent operations. We show how to implement the OPTIK pattern using the novel concept of OPTIK locks. These locks enable the use of version numbers for implementing very efficient optimistic concurrent data structures. Existing state-of-the-art lock-based data structures acquire the lock and then check for conflicts. In contrast, with OPTIK locks, we merge the lock acquisition with the detection of conflicting concurrency in a single atomic step, similarly to lock-free algorithms. We illustrate the power of our OPTIK pattern and its implementation by introducing four new algorithms and by optimizing four state-of-the-art algorithms for linked lists, skip lists, hash tables, and queues. Our results show that concurrent data structures built using OPTIK are more scalable than the state of the art.

References

  1. M. Aguilera, A. Merchant, M. Shah, A. Veitch, and C. Karamanolis. Sinfonia: A New Paradigm for Building Scalable Distributed Systems. SOSP '07. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. Arbel and H. Attiya. Concurrent Updates with RCU: Search Tree as an Example. PODC '14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. Arbel and A. Morrison. Predicate RCU: An RCU for Scalable Concurrent Updates. PPoPP '15. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. N. G. Bronson, J. Casper, H. Chafi, and K. Olukotun. A Practical Concurrent Binary Search Tree. PPoPP '10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Cascaval, C. Blundell, M. Michael, H. W. Cain, P. Wu, S. Chiras, and S. Chatterjee. Software Transactional Memory: Why Is It Only a Research Toy? ACM Queue '08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. L. Dalessandro, M. F. Spear, and M. L. Scott. NOrec: Streamlining STM by Abolishing Ownership Records. PPoPP '10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. T. David, R. Guerraoui, and V. Trigonakis. Everything You Always Wanted to Know About Synchronization but Were Afraid to Ask. SOSP '13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. T. David, R. Guerraoui, and V. Trigonakis. Asynchronized Concurrency: The Secret to Scaling Concurrent Search Data Structures. ASPLOS '15. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. D. Dice, O. Shalev, and N. Shavit. Transactional Locking II. DISC '06. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. D. Drachsler, M. Vechev, and E. Yahav. Practical Concurrent Binary Search Trees via Logical Ordering. PPoPP '14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A. Dragojević and T. Harris. STM in the Small: Trading Generality for Performance in Software Transactional Memory. EuroSys '12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. A. Dragojević, D. Narayanan, O. Hodson, and M. Castro. FaRM: Fast Remote Memory. NSDI '14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. F. Ellen, P. Fatourou, E. Ruppert, and F. van Breugel. Non-blocking Binary Search Trees. PODC '10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. P. Felber, C. Fetzer, and T. Riegel. Dynamic Performance Tuning of Word-based Software Transactional Memory. PPoPP '08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. K. Fraser. Practical Lock-Freedom. PhD thesis, University of Cambridge, 2004.Google ScholarGoogle Scholar
  16. V. Gramoli. More than You Ever Wanted to Know about Synchronization. PPoPP '15. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. V. Gramoli, P. Kuznetsov, S. Ravi, and D. Shang. Brief Announcement: A Concurrency-Optimal List-Based Set. DISC '15.Google ScholarGoogle Scholar
  18. R. Guerraoui and M. Kapalka. On the Correctness of Transactional Memory. PPoPP '08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. T. Harris. A Pragmatic Implementation of Non-blocking Linked Lists. DISC '01. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. T. E. Hart, P. E. McKenney, A. D. Brown, and J. Walpole. Performance of Memory Reclamation for Lockless Synchronization. JPDC '07. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. B. He, W. N. Scherer, and M. L. Scott. Preemption Adaptivity in Time-Published Queue-Based Spin Locks. HiPC '05. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. S. Heller, M. Herlihy, V. Luchangco, M. Moir, W. N. Scherer, and N. Shavit. A Lazy Concurrent List-Based Set Algorithm. OPODIS '05. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. D. Hendler, I. Incze, N. Shavit, and M. Tzafrir. Flat Combining and the Synchronization-parallelism Tradeoff. SPAA '10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. D. Hendler, N. Shavit, and L. Yerushalmi. A Scalable Lock-free Stack Algorithm. SPAA '04. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Herlihy. Wait-Free Synchronization. TOPLAS '91.Google ScholarGoogle Scholar
  26. M. Herlihy and J. Moss. Transactional Memory: Architectural Support for Lock-free Data Structures. ISCA '93. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. Herlihy and N. Shavit. The Art of Multiprocessor Programming, Revised First Edition. 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. M. Herlihy and J. Wing. Linearizability: A Correctness Condition for Concurrent Objects. TOPLAS '90. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. M. Herlihy, Y. Lev, V. Luchangco, and N. Shavit. A Simple Optimistic Skiplist Algorithm. SIROCCO '07. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Intel. Intel 64 and IA-32 Architectures Software Developer's Manual, Combined Volumes: 1, 2A, 2B, 2C, 3A, 3B and 3C. 2015.Google ScholarGoogle Scholar
  31. S. Kashyap, C. Min, and T. Kim. Scalability in the Clouds!: A Myth or Reality? APSys '15. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. H.-T. Kung and J. Robinson. On Optimistic Methods for Concurrency Control. TODS '81. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. C. Lameter. Effective Synchronization on Linux/NUMA Systems. Gelato Federation Meeting '05.Google ScholarGoogle Scholar
  34. D. Lea. Overview of Package util.concurrent Release 1.3.4. http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html, 2003.Google ScholarGoogle Scholar
  35. P. E. McKenney and J. D. Slingwine. Read-copy Update: Using Execution History to Solve Concurrency Problems. PDCS '98.Google ScholarGoogle Scholar
  36. J. M. Mellor-Crummey and M. L. Scott. Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. TOCS '91. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. M. M. Michael. High Performance Dynamic Lock-free Hash Tables and List-based Sets. SPAA '02. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. M. M. Michael. Hazard Pointers: Safe Memory Reclamation for Lock-free Objects. PDS '04. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. M. M. Michael and M. L. Scott. Simple, Fast, and Practical Non-blocking and Blocking Concurrent Queue Algorithms. PODC '96. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. A. Morrison and Y. Afek. Fast Concurrent Queues for x86 Processors. PPoPP '13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. A. Natarajan and N. Mittal. Fast Concurrent Lock-free Binary Search Trees. PPoPP '14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Oracle. ConcurrentHashMap in Java Docs. https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ConcurrentHashMap.html, 2015.Google ScholarGoogle Scholar
  43. W. Pugh. Concurrent Maintenance of Skip Lists. Technical report, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. R. Rajwar and J. Goodman. Speculative Lock Elision: Enabling Highly Concurrent Multithreaded Execution. MICRO '01. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. A. Roy, S. Hand, and T. Harris. A Runtime System for Software Lock Elision. EuroSys '09. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. N. Shavit and D. Touitou. Software Transactional Memory. PODC '97. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. H. Sundell and P. Tsigas. Fast and Lock-free Concurrent Priority Queues for Multi-thread Systems. JPDC '05. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. R. Treiber. Systems Programming: Coping with Parallelism. Technical report, 1986.Google ScholarGoogle Scholar
  49. P. Tsigas and Y. Zhang. A Simple, Fast and Scalable Non-blocking Concurrent FIFO Queue for Shared Memory Multiprocessor Systems. SPAA '01. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. L. Xiang and M. L. Scott. Software Partitioning of Hardware Transactions. PPoPP '15. Google ScholarGoogle ScholarDigital LibraryDigital Library

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in

Full Access

  • Published in

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 51, Issue 8
    PPoPP '16
    August 2016
    405 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/3016078
    Issue’s Table of Contents
    • cover image ACM Conferences
      PPoPP '16: Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming
      February 2016
      420 pages
      ISBN:9781450340922
      DOI:10.1145/2851141

    Copyright © 2016 ACM

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 27 February 2016

    Check for updates

    Qualifiers

    • research-article

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader
About Cookies On This Site

We use cookies to ensure that we give you the best experience on our website.

Learn more

Got it!