feedback directed implicit parallelism
In this paper we present an automated way of using spare CPU resources within a shared memory multi-processor or multi-core machine. Our approach is ( i ) to profile the execution of a program, ( ii ) from this to identify pieces of work which are promising sources of parallelism, ( iii ) recompile the program with this work being performed speculatively via a work-stealing system and then ( iv ) to detect at run-time any attempt to perform operations that would reveal the presence of speculation. We assess the practicality of the approach through an implementation based on GHC 6.6 along with a limit study based on the execution profiles we gathered. We support the full Concurrent Haskell language compiled with traditional optimizations and including I/O operations and synchronization as well as pure computation. We use 20 of the larger programs from the 'nofib' benchmark suite. The limit study shows that programs vary a lot in the parallelism we can identify: some have none, 16 have a potential 2x speed-up, 4 have 32x. In practice, on a 4-core processor, we get 10-80\% speed-ups on 7 programs. This is mainly achieved at the addition of a second core rather than beyond this. This approach is therefore not a replacement for manual parallelization, but rather a way of squeezing extra performance out of the threads of an already-parallel program or out of a program that has not yet been parallelized.
feedback direct implicit parallelism parallel paper automation use resource shared memory processor profiles program performance speculating work-stealing systems operability presence practical implementation support concurrency haskell language optimality synchronization computation benchmark core thread timing multi core parallel programming functional programming