2013
DOI: 10.1145/2400682.2400695
|View full text |Cite
|
Sign up to set email alerts
|

Compiler support for lightweight context switching

Abstract: We propose a new language-neutral primitive for the LLVM compiler, which provides efficient context switching and message passing between lightweight threads of control. The primitive, called SWAPSTACK, can be used by any language implementation based on LLVM to build higher-level language structures such as continuations, co-routines, and lightweight threads. As part of adding the primitives to LLVM, we have also added compiler support for passing parameters across context switches. Our modified LLVM compiler… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1
1

Citation Types

0
10
0

Year Published

2014
2014
2022
2022

Publication Types

Select...
2
2
2

Relationship

0
6

Authors

Journals

citations
Cited by 11 publications
(10 citation statements)
references
References 33 publications
0
10
0
Order By: Relevance
“…Dolan et al proposed the SWAPSTACK mechanism for LLVM to enable lightweight context switching [10]. To capture stack-allocated one-shot continuations in LLVM, a mechanism like SWAPSTACK can be used in conjunction with runtime system support.…”
Section: Related Workmentioning
confidence: 99%
“…Dolan et al proposed the SWAPSTACK mechanism for LLVM to enable lightweight context switching [10]. To capture stack-allocated one-shot continuations in LLVM, a mechanism like SWAPSTACK can be used in conjunction with runtime system support.…”
Section: Related Workmentioning
confidence: 99%
“…Swapstack effectively provides the abstraction of symmetric coroutines. The term Swapstack was first used by Dolan et al [5] to specifically refer to their efficient language-neutral compiler-assisted mechanism in LLVM for context-switching and message passing between lightweight threads of control ('green threads'). However, as we describe below, the ideas underlying Swapstack have been implemented before, including in the Self virtual machine [11,12].…”
Section: The Swapstack Operationmentioning
confidence: 99%
“…In this paper, we use the term Swapstack 4 in a broader sense-it is an abstract operation that rebinds the current thread to a different stack, regardless of its implementation. 5 Swapstack is an integral part of Mu. It not only supports coroutines and green threads, but is also a foundation for many VM mechanisms, such as thread creation, trap handling, and OSR.…”
Section: The Swapstack Operationmentioning
confidence: 99%
See 1 more Smart Citation
“…Second, even if interrupt handling on the TILE-Gx is rather efficient, its overhead remains high compared to other cpu costs. Solutions have been proposed to save and restore an execution context very efficiently using different architectural and compilation techniques [23,30,14,25]: More specifically in [23], a solution with a constant 4 cycles cost is presented. Hence the second feature we consider is efficient interrupt handling with a cost of 4 cycles.…”
Section: Analysis Of the Map Algorithmsmentioning
confidence: 99%