skip to main content
article

Balanced double queues for GC work-stealing on weak memory models

Published:18 June 2018Publication History
Skip Abstract Section

Abstract

Work-stealing is promising for scheduling and balancing parallel workloads. It has a wide range of applicability on middleware, libraries, and runtime systems of programming languages. OpenJDK uses work-stealing for copying garbage collection (GC) to balance copying tasks among GC threads. Each thread has its own queue to store tasks. When a thread has no task in its queue, it acts as a thief and attempts to steal a task from another thread's queue. However, this work-stealing algorithm requires expensive memory fences for pushing, popping, and stealing tasks, especially on weak memory models such as POWER and ARM. To address this problem, we propose a work-stealing algorithm that uses double queues. Each GC thread has a public queue that is accessible from other GC threads and a private queue that is only accessible by itself. Pushing and popping tasks in the private queue are free from expensive memory fences. The most significant point in our algorithm is providing a mechanism to maintain the load balance on the basis of the use of double queues. We developed a prototype implementation for parallel GC in OpenJDK8 for ppc64le. We evaluated our algorithm by using SPECjbb2015, SPECjvm2008, TPC-DS, and Apache DayTrader.

References

  1. Power ISA Version 2.07. 2013. https://www.power.org/documentation/ power-isa-version-2-07/. (2013).Google ScholarGoogle Scholar
  2. Umut A. Acar, Arthur Chargueraud, and Mike Rainey. 2013. Scheduling Parallel Programs by Work Stealing with Private Deques. In Proceedings of the 18th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’13). ACM, 219–228. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Nimar S. Arora, Robert D. Blumofe, and C. Greg Plaxton. 1998. Thread Scheduling for Multiprogrammed Multiprocessors. In Proceedings of the Tenth Annual ACM Symposium on Parallel Algorithms and Architectures (SPAA ’98). Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Intel Threading Building Blocks. 2018. https://software.intel.com/enus/intel-tbb. (2018).Google ScholarGoogle Scholar
  5. Robert D. Blumofe, Christopher F. Joerg, Bradley C. Kuszmaul, Charles E. Leiserson, Keith H. Randall, and Yuli Zhou. 1995. Cilk: An Efficient Multithreaded Runtime System. In Proceedings of the Fifth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’95). Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Hans-Juergen Boehm. 1993. Space Efficient Conservative Garbage Collection. In Proceedings of the ACM SIGPLAN 1993 Conference on Programming Language Design and Implementation (PLDI ’93). ACM, New York, NY, USA, 197–206. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. David Chase and Yossi Lev. 2005. Dynamic Circular Work-stealing Deque. In Proceedings of the Seventeenth Annual ACM Symposium on Parallelism in Algorithms and Architectures (SPAA ’05). Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Guojing Cong, Sreedhar Kodali, Sriram Krishnamoorthy, Doug Lea, Vijay Saraswat, and Tong Wen. 2008. Solving Large, Irregular Graph Problems Using Adaptive Work-Stealing. In International Conference on Parallel Processing (ICPP ’08). Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. David Cunningham, David Grove, Benjamin Herta, Arun Iyengar, Kiyokuni Kawachiya, Hiroki Murata, Vijay Saraswat, Mikio Takeuchi, and Olivier Tardieu. 2014. Resilient X10: Efficient Failure-aware Programming. In Proceedings of the 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’14). Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. James Dinan, D. Brian Larkins, P. Sadayappan, Sriram Krishnamoorthy, and Jarek Nieplocha. 2009. Scalable Work Stealing. In Proceedings of the Conference on High Performance Computing Networking, Storage and Analysis (SC ’09). Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. ARM documentation. 2018. http://infocenter.arm.com/help/index.jsp? topic=/com.arm.doc.home/index.html. (2018).Google ScholarGoogle Scholar
  12. Toshio Endo, Kenjiro Taura, and Akinori Yonezawa. 1997. A Scalable Mark-sweep Garbage Collector on Large-scale Shared-memory Machines. In Proceedings of the 1997 ACM/IEEE Conference on Supercomputing (SC ’97). Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Helin Eric. 2012. Improving load balancing during the marking phase of garbage collection.Google ScholarGoogle Scholar
  14. Christine H. Flood, David Detlefs, Nir Shavit, and Xiaolan Zhang. 2001. Parallel Garbage Collection for Shared Memory Multiprocessors. In Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium - Volume 1 (JVM’01). Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Matteo Frigo, Charles E. Leiserson, and Keith H. Randall. 1998. The Implementation of the Cilk-5 Multithreaded Language. In Proceedings of the ACM SIGPLAN 1998 Conference on Programming Language Design and Implementation (PLDI ’98). Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Wessam Hassanein. 2016. Understanding and Improving JVM GC Work Stealing at the Data Center Scale. In Proceedings of the 2016 ACM SIGPLAN International Symposium on Memory Management (ISMM 2016). Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Danny Hendler and Nir Shavit. 2002. Non-blocking Steal-half Work Queues. In Proceedings of the Twenty-first Annual Symposium on Principles of Distributed Computing (PODC ’02). Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Open J9. 2018. http://openj9.mybluemix.net/. (2018).Google ScholarGoogle Scholar
  19. Nhat Minh Lê, Antoniu Pop, Albert Cohen, and Francesco Zappa Nardelli. 2013. Correct and Efficient Work-stealing for Weak Memory Models. In Proceedings of the 18th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’13). 69–80. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Maged M. Michael, Martin T. Vechev, and Vijay A. Saraswat. 2009. Idempotent Work Stealing. In Proceedings of the 14th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’09). Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. OpenJDK. 2018. http://openjdk.java.net/. (2018).Google ScholarGoogle Scholar
  22. Hyunkyu Park, Changmin Lee, and Seung Hun Kim. 2013. MarkSharing: A Parallel Garbage Collection Algorithm for Low Synchronization Overhead. In International Conference on Parallel and Distributed Systems 2013 (ICPADS 2013). Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. WebSphere Application Server. 2018. http://www03.ibm.com/software/products/en/appserv-was. (2018).Google ScholarGoogle Scholar
  24. Olivier Tardieu, Benjamin Herta, David Cunningham, David Grove, Prabhanjan Kambadur, Vijay Saraswat, Avraham Shinnar, Mikio Takeuchi, and Mandana Vaziri. 2014. X10 and APGAS at Petascale. In Proceedings of the 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’14). Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Tom van Dijk and Jaco van de Pol. 2014. Lace: Non-blocking Split Deque for Work-Stealing. In Euro-Par 2014 International Workshops.Google ScholarGoogle Scholar

Index Terms

  1. Balanced double queues for GC work-stealing on weak memory models

    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 53, Issue 5
      ISMM '18
      May 2018
      119 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/3299706
      Issue’s Table of Contents
      • cover image ACM Conferences
        ISMM 2018: Proceedings of the 2018 ACM SIGPLAN International Symposium on Memory Management
        June 2018
        119 pages
        ISBN:9781450358019
        DOI:10.1145/3210563

      Copyright © 2018 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 18 June 2018

      Check for updates

      Qualifiers

      • 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!