Library and language support for scheduling non-blocking tasks has greatly improved, as have lightweight user threading packages. However, there is a significant gap between the two developments. In previous work--and ini¾?today's software packages--lightweight thread creation incurs much larger overheads than tasking libraries, even on tasks that end up never blocking. This limitation can be removed. To that end, we describe an extension to the Intel Cilk Plus runtime system, Concurrent Cilk, where tasks are lazily promoted to threads. Concurrent Cilk removes the overhead of thread creation on threads which end up calling no blocking operations, and is the first system to do so for C/C++ with legacy support standard calling conventions and stack representations. We demonstrate that Concurrent Cilk adds negligible overhead to existing Cilk programs, while its promoted threads remain more efficient than OS threads in terms of context-switch overhead and blocking communication. Further, it enables development of blocking data structures that create non-fork-join dependence graphs--which can expose more parallelism, and better supports data-driven computations waiting on results from remote devices.
['Christopher S. Zakian', 'Timothy A. K. Zakian', 'Abhishek Kulkarni', 'Buddhika Chamith', 'Ryan Newton']
Concurrent Cilk: Lazy Promotion from Tasks to Threads in C/C++