University of Limerick Institutional Repository

Compiler support for lightweight context switching

DSpace Repository

Show simple item record Dolan, Stephen Muralidharan, Servesh Gregg, David 2013-02-28T15:08:24Z 2013-02-28T15:08:24Z 2013
dc.description peer-reviewed en_US
dc.description.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 produces highly efficient code through a combination of exposing the context switching code to existing compiler optimizations, and adding novel compiler optimizations to further reduce the cost of context switches. To demonstrate the generality and efficiency of our primitives, we add one-shot continuations to C++, and provide a simple fiber library that allows millions of fibers to run on multiple cores, with a work-stealing scheduler and fast inter-fiber sychronization. We argue that compiler-supported lightweight context switching can be significantly faster than using a library to switch between contexts, and provide experimental evidence to support the position. en_US
dc.language.iso eng en_US
dc.publisher Association for Computing Machinery en_US
dc.relation.ispartofseries ACM Transactions on Architecture and Code Optimization;9(4), article no. 36
dc.rights "© ACM, 2013. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in ACM Transactions on Architecture and Code Optimizatio en_US
dc.subject languages en_US
dc.subject performances en_US
dc.subject experimentation en_US
dc.title Compiler support for lightweight context switching en_US
dc.type info:eu-repo/semantics/article en_US
dc.type.supercollection all_ul_research en_US
dc.type.supercollection ul_published_reviewed en_US
dc.contributor.sponsor IBM en_US
dc.contributor.sponsor SFI en_US
dc.contributor.sponsor IRCSET en_US
dc.relation.projectid 10/CE/I1855 en_US
dc.rights.accessrights info:eu-repo/semantics/closedAccess en_US

Files in this item

This item appears in the following Collection(s)

Show simple item record

Search ULIR


My Account