Results 1 -
1 of
1
Fine-grain Multithreading with Minimal Compiler Support -- A Cost Effective Approach to Implementing Efficient Multithreading Languages
- PLDI'97
, 1997
"... It is difficult to map the execution model of multithread-ing languages (languages which support fine-grain dynamic thread creation) onto the single stack execution model of C. Consequently, previous work on efficient multithreading uses elaborate frame formats and allocation strategy, with com-pile ..."
Abstract
-
Cited by 20 (5 self)
- Add to MetaCart
It is difficult to map the execution model of multithread-ing languages (languages which support fine-grain dynamic thread creation) onto the single stack execution model of C. Consequently, previous work on efficient multithreading uses elaborate frame formats and allocation strategy, with com-pilers customized for them. This paper presents an alterna-tive cost-effective implementation strategy for multithread-ing languages which can maximally exploit current sequen-tial C compilers. We identify a set of primitives whereby ef-ficient dynamic thread creation and switch can be achieved and clarify implementation issues and solutions which work under the stack frame layout and calling conventions of cur-rent C compilers. The primitives are implemented as a C library and named StackThreads. In StackThreads, a thread creation is done just by a C procedure call, max-imizing thread creation performance. When a procedure suspends an execution, the context of the procedure, which is roughly a stack frame of the procedure, is saved into heap and resumed later. With StackThreads, the compiler writer can straightforwardly translate sequential constructs of the source language into corresponding C statements or expres-sions, while using StackThreads primitives as a blackbox mechanism which switches execution between C procedures.

