Extending the Haskell foreign function interface with concurrency

  • Authors:
  • Simon Marlow;Simon Peyton Jones;Wolfgang Thaller

  • Affiliations:
  • Microsoft Research Ltd., Cambridge, U.K.;Microsoft Research Ltd., Cambridge, U.K.;Microsoft Research Ltd., Cambridge, U.K.

  • Venue:
  • Haskell '04 Proceedings of the 2004 ACM SIGPLAN workshop on Haskell
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

A Haskell system that includes both the Foreign Function Interface and the Concurrent Haskell extension must consider how Concurrent Haskell threads map to external Operating System threads for the purposes of specifying in which thread a foreign call is made.Many concurrent languages take the easy route and specify a one-to-one correspondence between the language's own threads and external OS threads. However, OS threads tend to be expensive, so this choice can limit the performance and scalability of the concurrent language.The main contribution of this paper is a language design that provides a neat solution to this problem, allowing the implementor of the language enough flexibility to provide cheap lightweight threads, while still providing the programmer with control over the mapping between internal threads and external threads where necessary.