首页> 外文期刊>ACM SIGPLAN Notices: A Monthly Publication of the Special Interest Group on Programming Languages >Fine-grain multithreading with minimal compiler support—a cost effective approach to implementing efficient multithreading languages
【24h】

Fine-grain multithreading with minimal compiler support—a cost effective approach to implementing efficient multithreading languages

机译:具有最少编译器支持的细粒度多线程—一种实现高效多线程语言的经济有效方法

获取原文
获取原文并翻译 | 示例
       

摘要

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.
机译:很难将多线程语言(支持细粒度动态线程创建的语言)的执行模型映射到C的单堆栈执行模型上。因此,以前有关高效多线程的工作使用了精心设计的帧格式和分配策略,并为他们。本文为多线程语言提出了另一种经济高效的实现策略,该策略可以最大程度地利用当前的顺序C编译器。我们确定了一组原语,从而可以实现高效的动态线程创建和切换,并阐明了在当前C编译器的堆栈框架布局和调用约定下工作的实现问题和解决方案。这些原语被实现为C库并命名为StackThreads。在StackThreads中,仅通过C过程调用即可完成线程创建,从而最大程度地提高了线程创建性能。当过程暂停执行时,该过程的上下文(大致是该过程的堆栈框架)将保存到堆中,并在以后恢复。使用StackThreads,编译器编写者可以直接将源语言的顺序结构转换为相应的C语句或表达式,同时将StackThreads原语用作在C过程之间切换执行的黑盒机制。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号