skip to main content
research-article

Lock cohorting: a general technique for designing NUMA locks

Published:25 February 2012Publication History
Skip Abstract Section

Abstract

Multicore machines are quickly shifting to NUMA and CC-NUMA architectures, making scalable NUMA-aware locking algorithms, ones that take into account the machines' non-uniform memory and caching hierarchy, ever more important. This paper presents lock cohorting, a general new technique for designing NUMA-aware locks that is as simple as it is powerful.

Lock cohorting allows one to transform any spin-lock algorithm, with minimal non-intrusive changes, into scalable NUMA-aware spin-locks. Our new cohorting technique allows us to easily create NUMA-aware versions of the TATAS-Backoff, CLH, MCS, and ticket locks, to name a few. Moreover, it allows us to derive a CLH-based cohort abortable lock, the first NUMA-aware queue lock to support abortability.

We empirically compared the performance of cohort locks with prior NUMA-aware and classic NUMA-oblivious locks on a synthetic micro-benchmark, a real world key-value store application memcached, as well as the libc memory allocator. Our results demonstrate that cohort locks perform as well or better than known locks when the load is low and significantly out-perform them as the load increases.

References

  1. libmemcached. www.libmemcached.org.Google ScholarGoogle Scholar
  2. memcached -- a distributed memory object caching system. www.memcached.org.Google ScholarGoogle Scholar
  3. A. Agarwal and M. Cherian. Adaptive backoff synchronization techniques. SIGARCH Comput. Archit. News, 17:396--406, April 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. T. Craig. Building FIFO and priority-queueing spin locks from atomic swap. Technical Report TR 93-02-02, University of Washington, Dept of Computer Science, February 1993.Google ScholarGoogle Scholar
  5. D. Dice. US Patent # 07318128: Wakeup affinity and locality.Google ScholarGoogle Scholar
  6. D. Dice and A. Garthwaite. Mostly Lock Free Malloc. In Proceedings of the 3rd International Symposium on Memory Management, pages 163--174, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. Dice, V. Marathe, and N. Shavit. Flat Combining NUMA Locks. In Proceedings of the 23rd ACM Symposium on Parallelism in Algorithms and Architectures, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. Hendler, I. Incze, N. Shavit, and M. Tzafrir. Flat Combining and the Synchronization-Parallelism Tradeoff. In Proceedings of the 22nd ACM Symposium on Parallelism in Algorithms and Architectures, pages 355--364, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Herlihy and N. Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. Mellor-Crummey and M. Scott. Algorithms for scalable synchronization on shared-memory multiprocessors. ACM Trans. Computer Systems, 9(1):21--65, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. M. Pohlack and S. Diestelhorst. From Lightweight Hardware Transactional Memory to LightWeight Lock Elision. In Proceedings of the 6th ACM SIGPLAN Workshop on Transactional Computing, 2011.Google ScholarGoogle Scholar
  12. Z. Radovic and E. Hagersten. Hierarchical Backoff Locks for Nonuniform Communication Architectures. In HPCA-9, pages 241--252, Anaheim, California, USA, Feb. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Scott and W. Scherer. Scalable queue-based spin locks with timeout. In Proc. 8th ACM SIGPLAN Symposium on Principles and Practices of Parallel Programming, pages 44--52, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. L. Scott. Non-blocking timeout in scalable queue-based spin locks. In Proceedings of the twenty-first annual symposium on Principles of distributed computing, PODC '02, pages 31--40, New York, NY, USA, 2002. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Victor Luchangco and Dan Nussbaum and Nir Shavit. A Hierarchical CLH Queue Lock. In Proceedings of the 12th International Euro-Par Conference, pages 801--810, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Lock cohorting: a general technique for designing NUMA locks

      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 47, Issue 8
        PPOPP '12
        August 2012
        334 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2370036
        Issue’s Table of Contents
        • cover image ACM Conferences
          PPoPP '12: Proceedings of the 17th ACM SIGPLAN symposium on Principles and Practice of Parallel Programming
          February 2012
          352 pages
          ISBN:9781450311601
          DOI:10.1145/2145816

        Copyright © 2012 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 25 February 2012

        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!