Recent developments in mircroprocessor design show a clear trend towards multi-core and multi-processor architectures. To exploit the available hardware resources provided by the additional cores, programmers must write parallel code by e.g. distributing workloads to multiple threads of execution. To simplify this task, numerous approaches have been proposed. One successful candidate is OpenMP , which is a standard that provides a high-level interface for parallel programming.
While OpenMP performs well for regular workloads, unbalanced workloads can lead to inefficient resource utilization. The main reason for this inefficiency is that the number of threads in a parallel region must remain constant throughout the parallel region's scope. As a consequence, idle threads cannot be used to assist parallel regions, even if the regions could potentially profit from additional resources.
The remedy this issue, we propose dynamic threading as an extension to the OpenMP standard. Dynamic threading enables idle threads to join active work-sharing constructs. We implemented our approach in the GNU Compiler. Preliminary benchmarking shows that our approach does not introduce significant additional overhead, and improves performance for several scenarios.
Master Thesis by Jacques Stadler