Results 11 - 20
of
27
Threads Yield Continuations
- Lisp and Symbolic Computation
, 1997
"... . Just as a traditional continuation represents the rest of a computation from a given point in the computation, a subcontinuation represents the rest of a subcomputation from a given point in the subcomputation. Subcontinuations are more expressive than traditional continuations and have been show ..."
Abstract
-
Cited by 7 (0 self)
- Add to MetaCart
. Just as a traditional continuation represents the rest of a computation from a given point in the computation, a subcontinuation represents the rest of a subcomputation from a given point in the subcomputation. Subcontinuations are more expressive than traditional continuations and have been shown to be useful for controlling tree-structured concurrency, yet they have previously been implemented only on uniprocessors. This article describes a concurrent implementation of one-shot subcontinuations. Like oneshot continuations, one-shot subcontinuations are first-class but may be invoked at most once, a restriction obeyed by nearly all programs that use continuations. The techniques used to implement one-shot subcontinuations may be applied directly to other one-shot continuation mechanisms and may be generalized to support multi-shot continuations as well. A novel feature of the implementation is that continuations are implemented in terms of threads. Because the implementation model ...
Distributed Computations Driven by Resource Consumption
- In IEEE International Conference on Computer Languages (ICCL'98
, 1998
"... Millions of computers are now connected together by the Internet. At a fast pace, applications are taking advantage of these new capabilities, and are becoming parallel and distributed, e.g. applets on the WWW or agent technology. As we live in a world with finite resources, an important challenge i ..."
Abstract
-
Cited by 6 (4 self)
- Add to MetaCart
Millions of computers are now connected together by the Internet. At a fast pace, applications are taking advantage of these new capabilities, and are becoming parallel and distributed, e.g. applets on the WWW or agent technology. As we live in a world with finite resources, an important challenge is to be able to control computations in such an environment. For instance, a user might like to suspend a computation because another one seems to be more promising. In this paper, we present a paradigm that allows the programmer to monitor and control computations, whether parallel or distributed, by mastering their resource consumption. We describe an implementation on top of the thread library PPCR and the message-passing library Nexus. 1 Introduction As we live in a world with finite resources, it is of paramount importance for the user to be able to monitor and control computations. This task is all the more complex since computations may be parallel, distributed, and most probably ma...
Abstract Lightweight Concurrency Primitives for GHC
"... The Glasgow Haskell Compiler (GHC) has quite sophisticated support for concurrency in its runtime system, which is written in lowlevel C code. As GHC evolves, the runtime system becomes increasingly complex, error-prone, difficult to maintain and difficult to add new concurrency features. This paper ..."
Abstract
-
Cited by 6 (2 self)
- Add to MetaCart
The Glasgow Haskell Compiler (GHC) has quite sophisticated support for concurrency in its runtime system, which is written in lowlevel C code. As GHC evolves, the runtime system becomes increasingly complex, error-prone, difficult to maintain and difficult to add new concurrency features. This paper presents an alternative approach to implement concurrency in GHC. Rather than hard-wiring all kinds of concurrency features, the runtime system is a thin substrate providing only a small set of concurrency primitives, and the remaining concurrency features are implemented in software libraries written in Haskell. This design improves the safety of concurrency support; it also provides more customizability of concurrency features, which can be developed as Haskell library packages and deployed modularly. Categories and Subject Descriptors D.1.1 [Programming Techniques]:
Revisiting Coroutines
, 2004
"... This paper defends the revival of coroutines as a general control abstraction. After proposing a new classification of coroutines, we introduce the concept of full asymmetric coroutines and provide a precise definition for it through an operational semantics. We then demonstrate that full coroutines ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
This paper defends the revival of coroutines as a general control abstraction. After proposing a new classification of coroutines, we introduce the concept of full asymmetric coroutines and provide a precise definition for it through an operational semantics. We then demonstrate that full coroutines have an expressive power equivalent to one-shot continuations and oneshot partial continuations. We also show that full asymmetric coroutines and one-shot partial continuations have many similarities, and therefore present comparable benefits. Nevertheless, coroutines are easier implemented and understood, specially in the realm of procedural languages. Finally, we provide a collection of programming examples that illustrate the use of full asymmetric coroutines to support direct and concise implementations of several useful control behaviors, including cooperative multitasking.
The MT Stack: Paging Algorithm and Performance in a Distributed Virtual Memory System
- CLEI Electronic Journal
"... Advances in parallel computation are of central importance to Artificial Intelligence due to the significant amount of time and space their programs require. Functional languages have been identified as providing a clear and concise way of programming parallel machines for artificial intelligence ta ..."
Abstract
-
Cited by 4 (4 self)
- Add to MetaCart
Advances in parallel computation are of central importance to Artificial Intelligence due to the significant amount of time and space their programs require. Functional languages have been identified as providing a clear and concise way of programming parallel machines for artificial intelligence tasks. The problems of exporting, creating, and manipulating processes have been thoroughly studied in relation to the parallelization of functional languages, but none of the necessary support structures needed for the abstraction, like a distributed memory, have been properly designed. In order to design and implement parallel functional languages efficiently, we propose the development of an all-software based distributed virtual memory system designed specifically for the memory demands of a functional language. In this paper, we review the MT architecture and briefly survey the related literature that lead to its development. We then present empirical results obtained from observing the paging behavior of the MT stack. Our empirical results suggest that LRU is superior to FIFO as a page replacement policy for MT stack pages. We present a proof that LRU is an opti-
Type-directed continuation allocation
- In 2nd International Workshop on Types in Compilation, volume 1473 of LNCS
, 1998
"... Abstract. Suppose we translate two different source languages, £¥ ¤ and £§ ¦ , into the same intermediate language; can they safely interoperate in the same address space and under the same runtime system? If £ ¤ supports first-class continuations (call/cc) and £ ¦ does not, can £ ¦ programs call ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
Abstract. Suppose we translate two different source languages, £¥ ¤ and £§ ¦ , into the same intermediate language; can they safely interoperate in the same address space and under the same runtime system? If £ ¤ supports first-class continuations (call/cc) and £ ¦ does not, can £ ¦ programs call arbitrary £ ¤ functions? Would the fact of possibly calling £¨ ¤ impose restrictions on the implementation strategy of £ ¦ ? Can we compile £ ¤ functions that do not invoke call/cc using more efficient techniques borrowed from the £ ¦ implementation? Our view is that the implementation of a common intermediate language ought to support the so-called pay-as-you-go efficiency: first-order monomorphic functions should be compiled as efficiently as in C and assembly languages, even though they may be passed to arbitrary polymorphic functions that support advanced control primitives (e.g. call/cc). In this paper, we present a typed intermediate language with effect and resource annotations, ensuring the safety of inter-language calls while allowing the compiler to choose continuation allocation strategies. 1
Programmable Concurrency in a Pure and Lazy Language
, 2008
"... First, I thank my dissertation advisor, Steve Zdancewic, who has always been supportive to me in the last five years. Steve taught me how to do research, co-authored many papers with me, gave me insightful feedbacks and practically line-by-line writing advices, encouraged me to look for research dir ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
First, I thank my dissertation advisor, Steve Zdancewic, who has always been supportive to me in the last five years. Steve taught me how to do research, co-authored many papers with me, gave me insightful feedbacks and practically line-by-line writing advices, encouraged me to look for research directions that I am most interested in and obtained funding for my dissertation research. As an advisor, he could not have been more helpful. My other mentors on programming languages research also deserve my thanks. Benjamin Pierce enlightened me on functional programming and the theory of programming languages; Stephanie Weirich impressed me on what type systems can do; Simon Peyton Jones educated me on the principles and philosophies of language design; Simon Marlow showed me how far one can go to make things run faster. In particular, I thank Benjamin Pierce and Stephanie Weirich for serving in my thesis committee. I thank all the PL Club members for sharing their knowledge in the weekly discussions. I particularly thank Geoffery Washburn for helping me out with the CIS-670 project and patiently explaining programming language concepts to me when I first started doing research in programming languages. I should also give special thanks to Stephen Tse who has been a great friend to talk about information-flow type systems and functional programming.
Sharing Continuations: Proofnets for Languages With Explicit Control
- In ESOP'2000, volume 1782. LNCS
, 2000
"... We introduce graph reduction technology that implements functional languages with control, such as Scheme with call/cc, where continuations can be manipulated explicitly as values, and can be optimally reduced in the sense of Lévy. The technology is founded on proofnets for multiplicative-exponentia ..."
Abstract
-
Cited by 3 (2 self)
- Add to MetaCart
We introduce graph reduction technology that implements functional languages with control, such as Scheme with call/cc, where continuations can be manipulated explicitly as values, and can be optimally reduced in the sense of Lévy. The technology is founded on proofnets for multiplicative-exponential linear logic, extending the techniques originally proposed by Lamping, where we adapt the continuation-passing style transformation to yield a new understanding of sharable values. Confluence is maintained by returning multiple answers to a (shared) continuation. Proofnets provide a concurrent version of linear logic proofs, eliminating structurally irrelevant sequentialization, and ignoring asymmetric distinctions between inputs and outputs -- dually, expressions and continuations. While Lamping's graphs and their variants encode an embedding of intuitionistic logic into linear logic, our construction implicitly contains an embedding of classical logic into linear logic. We propose...
Continuation-based Transformations for Coordination Languages
- Theoretical Computer Science
, 1999
"... . Coordination languages for parallel and distributed systems specify mechanisms for creating tasks and communicating data among them. These languages typically assume that (a) once a task begins execution on some processor, it will remain resident on that processor throughout its lifetime, and (b) ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
. Coordination languages for parallel and distributed systems specify mechanisms for creating tasks and communicating data among them. These languages typically assume that (a) once a task begins execution on some processor, it will remain resident on that processor throughout its lifetime, and (b) communicating shared data among tasks is through some form of message-passing and data migration. In this paper, we investigate an alternative approach to understanding coordination. Communication-passing style (CmPS) refers to a coordination semantics in which data communication is always undertaken by migrating the continuation of the task requiring the data to the processor where the data resides. Communication-passing style is closely related to continuation-passing style (CPS), a useful transformation for compiling functional languages. Just as CPS eliminates implicit call-return sequences, CmPS eliminates implicit inter-processor data communication and synchronization reque...

