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.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference25 articles.
1. Power ISA Version 2.07. 2013. https://www.power.org/documentation/ power-isa-version-2-07/. (2013). Power ISA Version 2.07. 2013. https://www.power.org/documentation/ power-isa-version-2-07/. (2013).
2. Scheduling parallel programs by work stealing with private deques
3. Thread scheduling for multiprogrammed multiprocessors
4. Intel Threading Building Blocks. 2018. https://software.intel.com/enus/intel-tbb. (2018). Intel Threading Building Blocks. 2018. https://software.intel.com/enus/intel-tbb. (2018).
5. Cilk