Fine-grain Multithreading with Minimal Compiler Support -A Cost Effective Approach to Implementing Efficient Multithreading Languages

2Citations
Citations of this article
12Readers
Mendeley users who have this article in their library.

Abstract

It is difficult to map the execution model of multithreading 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 compilers customized for them. This paper presents an alternative cost-effective implementation strategy for multithreading languages which can maximally exploit current sequential C compilers. We identify a set of primitives whereby efficient 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 current 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, maximizing 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 expressions, while using StackThreads primitives as a blackbox mechanism which switches execution between C procedures.

Cite

CITATION STYLE

APA

Taura, K., & Yonezawa, A. (1997). Fine-grain Multithreading with Minimal Compiler Support -A Cost Effective Approach to Implementing Efficient Multithreading Languages. SIGPLAN Notices (ACM Special Interest Group on Programming Languages), 32(5), 320–333. https://doi.org/10.1145/258916.258944

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free