Programmable concurrency in a pure and lazy language

Peng Li, University of Pennsylvania


This dissertation presents a number of methods to build massively concurrent network applications in Haskell, a pure, lazy and functional programming language. The key challenge is to combine threads and events , two seemingly opposing programming models, into one single application, so the programmer can get both the ease of multithreaded programming and the performance of event-driven systems. This dissertation first shows a purely application-level solution using monadic, continuation-passing style threads and evaluates its performance using benchmarking programs. It then shows a more generic solution obtained by re-designing the Haskell runtime system with lightweight concurrency primitives that can be used to implement high-level concurrency features in Haskell libraries. The new runtime system allows massive concurrency to be implemented using any of the following configurations: OS threads, user-level threads, or application-level, monadic threads. This dissertations presents the prototype implementation of the new runtime system and two concurrency libraries. It also compares the I/O performance of different concurrency configurations using benchmark programs and discusses their trade-offs. The conclusion of this dissertation is summarized from three different perspectives. For systems programmers, it compares the two solutions to combine events and threads in Haskell. For developers of the Haskell runtime system, it discusses the trade-offs involved to adopt the new runtime system design. For language designers, it summarizes the lessons learned in the programming experience of using the Haskell language.

Subject Area

Computer science

Recommended Citation

Li, Peng, "Programmable concurrency in a pure and lazy language" (2008). Dissertations available from ProQuest. AAI3328611.