## The Essence of Multitasking (2006)

### Cached

### Download Links

- [www.cs.missouri.edu]
- [www.cs.missouri.edu]
- DBLP

### Other Repositories/Bibliography

Venue: | Proceedings of the 11th International Conference on Algebraic Methodology and Software Technology, volume 4019 of Lecture Notes in Computer Science |

Citations: | 7 - 4 self |

### BibTeX

@INPROCEEDINGS{Harrison06theessence,

author = {William L. Harrison},

title = {The Essence of Multitasking},

booktitle = {Proceedings of the 11th International Conference on Algebraic Methodology and Software Technology, volume 4019 of Lecture Notes in Computer Science},

year = {2006},

pages = {158--172},

publisher = {Springer}

}

### OpenURL

### Abstract

Abstract. This article demonstrates how a powerful and expressive abstraction from concurrency theory—monads of resumptions—plays a dual rôle as a programming tool for concurrent applications. The article demonstrates how a wide variety of typical OS behaviors may be specified in terms of resumption monads known heretofore exclusively in the literature of programming language semantics. We illustrate the expressiveness of the resumption monad with the construction of an exemplary multitasking kernel in the pure functional language Haskell. 1

### Citations

1312 | Constructive functional programming
- Bird
- 1989
(Show Context)
Citation Context ...onad 5 . But is IO truly a monad (i.e., does it obey the monad laws)? All of these impurities have been handled individually via various monadic constructions (consider the manifestly incomplete list =-=[21, 26]-=-) and the current approach combines some of these constructions into a single monad. While it is not the intention of the current work to model the awkward squad as it occurs in Haskell, the technique... |

583 |
The Theory and Practice of Concurrency
- Roscoe
- 1998
(Show Context)
Citation Context ... a high-level, resembles the interactions of threads within a multitasking operating system. To motivate resumptions, let’s compare them with a natural model of concurrency known as the “trace model” =-=[28]-=-. The trace model views threads as (potentially infinite) streams of atomic operations and the meaning of concurrent thread execution as the set of all their possible thread interleavings. Imagine tha... |

328 |
Denotational Semantics: A Methodology for Language Development
- Schmidt
- 1986
(Show Context)
Citation Context ...tic basis for these languages. Resumptions are a denotational model of concurrency first introduced by Plotkin [27]; excellent introductions to this non-monadic form of resumptions are due to Schmidt =-=[29]-=- and Bakker [2]. Moggi was the first to observe that the categorical structure known as a monad was appropriate for the development of modular semantic theories for programming languages [21]. In his ... |

212 | A Powerdomain Construction
- Plotkin
- 1976
(Show Context)
Citation Context ...orted in part by subcontract GPACS0016, System Information Assurance II, through OGI/Oregon Health & Sciences University. 1 All the code presented in this paper is available online [13].sA resumption =-=[27]-=- is stream-like construction similar to a continuation in that both tell what the “rest of the computation” is. However, resumptions are considerably less powerful than continuations—the only thing on... |

165 |
An Abstract View of Programming Languages
- Moggi
- 1989
(Show Context)
Citation Context ...Haskell 98 code 1 . And, because this machinery may be generalized as monad transformers, the functionality described here may be reused and refined easily. The literature involving resumption monads =-=[21, 23, 11, 22, 18, 17]-=- focuses on their use in elegant and abstract mathematical semantics for programming languages. The current work advocates resumption monads as a useful abstraction for concurrent functional programmi... |

133 | The SwitchWare Active Network Architecture
- Alexander, Arbaugh, et al.
(Show Context)
Citation Context ...ed from a language implementation or run-time platform. There are many applications of functional languages to system software that rely on concurrency primitives from existing libraries or languages =-=[12, 1]-=-; as the modeling of concurrency is not their primary concern, no further comparison is made. Similarly, there are many concurrent functional languages—concurrent versions of ML, Haskell, and Erlang—b... |

130 | Representing monads
- Filinski
- 1994
(Show Context)
Citation Context ...or shift and reset. While it is certainly possible to implement the full panoply of OS behaviors with CPS, it is also possible to implement much, much more—most known effects may be expressed via CPS =-=[7]-=-. This expressiveness can make programs in CPS difficult to reason about, rendering CPS less attractive as a foundation for software verification. Resumptions can be viewed as a disciplined use of con... |

106 | Lazy functional state threads
- Launchbury, Jones
- 1994
(Show Context)
Citation Context ...tructure is entirely implicit—there are no atomic actions persse. Demand determines the extent to which a thread is evaluated—rather like the “threads” encoded by computations in the lazy state monad =-=[19]-=-. Thread structure in the resumption-monadic setting is explicit—one may even view a resumption monad as an abstract data type for threads. This exposed thread structure allows deterministic schedulin... |

99 | Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in haskell
- Jones
- 2002
(Show Context)
Citation Context ...el presented here confronts many “impurities” considered difficult to accommodate within a pure, functional setting—concurrency, state, and i/o— which are all members of the so-called “Awkward Squad” =-=[24]-=-. In Haskell, these real world impurities are swept, in the memorably colorful words of Simon Peyton Jones, into a “giant sin-bin” called the IO monad 5 . But is IO truly a monad (i.e., does it obey t... |

75 | Continuation-based multiprocessing
- Wand
- 1980
(Show Context)
Citation Context ...g the underlying language implementation as with demand-driven concurrency. The third camp uses CPS to implement thread interleaving. Concurrent behavior may be modeled with first-class continuations =-=[4, 34, 9, 33]-=- because the explicit control over evaluation order in CPS allows multiple threads to be “interwoven” to produce any possible execution order. Claessen presents a formulation of this style using the C... |

55 | Representing layered monads
- Filinski
- 1999
(Show Context)
Citation Context ...of concurrency could be expressed in the resumption monad. The particular formulation of the basic resumption monad we use is due to Papaspyrou [23, 22], although other equivalent formulations exist =-=[21, 6, 8]-=-. 2 Review: Monads Monads are algebras just as groups or rings are algebras; that is, a monad is a type constructor (functor) with associated operators obeying certain equations— the well-known “monad... |

39 | Trampolined style
- Ganz, Friedman, et al.
- 1999
(Show Context)
Citation Context ...tions can be viewed as a disciplined use of continuations which allows for simpler reasoning. The last camp uses a program-structuring paradigm for multi-threading called trampoline-style programming =-=[10]-=-. Programs in trampoline-style are organized around a single scheduling loop called a “trampoline.” One attractive feature of trampolining is that it requires no appeal to first-class continuations. O... |

38 |
Purely Functional Operating Systems
- Henderson
- 1982
(Show Context)
Citation Context ..., shared state and multitasking concurrency. The concurrency models underlying previous applications of functional languages to concurrent system software fall broadly into four camps. The first camp =-=[16, 31, 32, 5]-=- assumes the existence of a non-deterministic choice operator to accommodate “non-functional” situations where more than one action is possible, such as a scheduler choosing between two or more waitin... |

37 | Semantic Lego
- Espinosa
- 1995
(Show Context)
Citation Context ...of concurrency could be expressed in the resumption monad. The particular formulation of the basic resumption monad we use is due to Papaspyrou [23, 22], although other equivalent formulations exist =-=[21, 6, 8]-=-. 2 Review: Monads Monads are algebras just as groups or rings are algebras; that is, a monad is a type constructor (functor) with associated operators obeying certain equations— the well-known “monad... |

34 | Interactive programs in dependent type theory
- Hancock, Setzer
- 2000
(Show Context)
Citation Context ...Haskell 98 code 1 . And, because this machinery may be generalized as monad transformers, the functionality described here may be reused and refined easily. The literature involving resumption monads =-=[21, 23, 11, 22, 18, 17]-=- focuses on their use in elegant and abstract mathematical semantics for programming languages. The current work advocates resumption monads as a useful abstraction for concurrent functional programmi... |

30 |
A poor man’s concurrency monad
- Claessen
- 1999
(Show Context)
Citation Context ...g the underlying language implementation as with demand-driven concurrency. The third camp uses CPS to implement thread interleaving. Concurrent behavior may be modeled with first-class continuations =-=[4, 34, 9, 33]-=- because the explicit control over evaluation order in CPS allows multiple threads to be “interwoven” to produce any possible execution order. Claessen presents a formulation of this style using the C... |

28 | Modular Monadic Semantics and Compilation
- Liang
- 1998
(Show Context)
Citation Context ...iew: Monads Monads are algebras just as groups or rings are algebras; that is, a monad is a type constructor (functor) with associated operators obeying certain equations— the well-known “monad laws” =-=[20]-=-. There are several formulations of monads, and we use one familiar to functional programmers called the Kleisli formulation: a monad M is given by an eponymous type constructor M and the unit operato... |

27 |
Control Flow Semantics. Foundations of Computing Series
- Bakker, Vink
- 1996
(Show Context)
Citation Context ...ese languages. Resumptions are a denotational model of concurrency first introduced by Plotkin [27]; excellent introductions to this non-monadic form of resumptions are due to Schmidt [29] and Bakker =-=[2]-=-. Moggi was the first to observe that the categorical structure known as a monad was appropriate for the development of modular semantic theories for programming languages [21]. In his initial develop... |

21 | Programming languages as operating systems (or revenge of the son of the lisp machine
- Flatt, Findler, et al.
- 1999
(Show Context)
Citation Context ...g the underlying language implementation as with demand-driven concurrency. The third camp uses CPS to implement thread interleaving. Concurrent behavior may be modeled with first-class continuations =-=[4, 34, 9, 33]-=- because the explicit control over evaluation order in CPS allows multiple threads to be “interwoven” to produce any possible execution order. Claessen presents a formulation of this style using the C... |

19 |
Message-based functional operating systems
- Stoye
- 1986
(Show Context)
Citation Context ..., shared state and multitasking concurrency. The concurrency models underlying previous applications of functional languages to concurrent system software fall broadly into four camps. The first camp =-=[16, 31, 32, 5]-=- assumes the existence of a non-deterministic choice operator to accommodate “non-functional” situations where more than one action is possible, such as a scheduler choosing between two or more waitin... |

15 | Achieving information flow security through precise control of effects
- Harrison, Hook
- 2005
(Show Context)
Citation Context ...tiple extensions to a core “basic operation” kernel (i.e., one having only a Cont request). The framework developed here has been applied to such seemingly diverse purposes as language-based security =-=[15]-=- and bioinformatics [14]; each of these applications is an instance of this framework. The difference is evident in the request and response data types Req and Rsp. Consider the subject of [14], which... |

13 | The Fox project: Advanced Language Technology for Extensible Systems
- Harper, Lee, et al.
- 1998
(Show Context)
Citation Context ...ed from a language implementation or run-time platform. There are many applications of functional languages to system software that rely on concurrency primitives from existing libraries or languages =-=[12, 1]-=-; as the modeling of concurrency is not their primary concern, no further comparison is made. Similarly, there are many concurrent functional languages—concurrent versions of ML, Haskell, and Erlang—b... |

12 |
An approach to functional operating systems
- Turner
(Show Context)
Citation Context ..., shared state and multitasking concurrency. The concurrency models underlying previous applications of functional languages to concurrent system software fall broadly into four camps. The first camp =-=[16, 31, 32, 5]-=- assumes the existence of a non-deterministic choice operator to accommodate “non-functional” situations where more than one action is possible, such as a scheduler choosing between two or more waitin... |

11 | A resumption monad transformer and its applications in the semantics of concurrency - Papaspyrou - 2001 |

11 | Towards a strongly typed functional operating system
- Weelden, Plasmeijer
- 2002
(Show Context)
Citation Context |

8 | A study of evaluation order semantics in expressions with side effects
- Papaspyrou, Macos
(Show Context)
Citation Context ...Haskell 98 code 1 . And, because this machinery may be generalized as monad transformers, the functionality described here may be reused and refined easily. The literature involving resumption monads =-=[21, 23, 11, 22, 18, 17]-=- focuses on their use in elegant and abstract mathematical semantics for programming languages. The current work advocates resumption monads as a useful abstraction for concurrent functional programmi... |

7 | Deterministic Concurrency
- Carter
- 1994
(Show Context)
Citation Context ...ated easily into the kernel presented here via the non-determinism monad, although such non-determinism is of a different, but closely related, form. The second model uses “demand-driven concurrency” =-=[3, 30]-=- in which threads are mutually recursive bindings whose lazy evaluation simulates multitasking concurrency. Interleaving order is determined (in part) by the interdependency of these bindings. However... |

7 |
Categories of processes enriched in final coalgebras
- Krstić, Launchbury, et al.
(Show Context)
Citation Context |

6 | Concurrent and Distributed Functional Systems
- Spiliopoulou
- 1999
(Show Context)
Citation Context ...ated easily into the kernel presented here via the non-determinism monad, although such non-determinism is of a different, but closely related, form. The second model uses “demand-driven concurrency” =-=[3, 30]-=- in which threads are mutually recursive bindings whose lazy evaluation simulates multitasking concurrency. Interleaving order is determined (in part) by the interdependency of these bindings. However... |

5 |
The design and implementation of an operating system in a functional language
- Cupitt
- 1990
(Show Context)
Citation Context |

3 | Domain Specific Languages for Cellular Interactions
- Harrison, Harrison
- 2004
(Show Context)
Citation Context ...re “basic operation” kernel (i.e., one having only a Cont request). The framework developed here has been applied to such seemingly diverse purposes as language-based security [15] and bioinformatics =-=[14]-=-; each of these applications is an instance of this framework. The difference is evident in the request and response data types Req and Rsp. Consider the subject of [14], which is the formal modeling ... |

1 |
The Essence of Multithreading Codebase. Available from www.cs.missouri.edu/~harrison/EssenceOfMultitasking
- Harrison
(Show Context)
Citation Context ... This research supported in part by subcontract GPACS0016, System Information Assurance II, through OGI/Oregon Health & Sciences University. 1 All the code presented in this paper is available online =-=[13]-=-.sA resumption [27] is stream-like construction similar to a continuation in that both tell what the “rest of the computation” is. However, resumptions are considerably less powerful than continuation... |