1 / 39
文档名称:

Tutorial on Parallel & Concurrent Programming in Haskell, A - Simon Peyton Jones & Satnam Singh - 2009.pdf

格式:pdf   页数:39
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Tutorial on Parallel & Concurrent Programming in Haskell, A - Simon Peyton Jones & Satnam Singh - 2009.pdf

上传人:kuo08091 2014/3/21 文件大小:0 KB

下载得到文件列表

Tutorial on Parallel & Concurrent Programming in Haskell, A - Simon Peyton Jones & Satnam Singh - 2009.pdf

文档介绍

文档介绍:A Tutorial on Parallel and Concurrent
Programming in Haskell
Simon Peyton Jones and Satnam Singh
Microsoft Research Cambridge
simonpj@, satnams@
Abstract. This practical tutorial introduces the features available in
Haskell for writing parallel and concurrent programs. We first describe
how to write semi-explicit parallel programs by using annotations to ex-
press opportunities for parallelism and to help control the granularity of
parallelism for effective execution on modern operating systems and pro-
cessors. We then describe the mechanisms provided by Haskell for writing
explicitly parallel programs with a focus on the use of software transac-
tional memory to help share information between threads. Finally, we
show how nested data parallelism can be used to write deterministically
parallel programs which allows programmers to use rich data types in
data parallel programs which are automatically transformed into flat
data parallel versions for efficient execution on multi-core processors.
1 Introduction
The introduction of multi-core processors has renewed interest in parallel func-
tional programming and there are now several interesting projects that explore
the advantages of a functional language for writing parallel code or implicitly par-
alellizing code written in a pure functional language. These lecture notes present
a variety of techniques for writing concurrent parallel programs which include
existing techniques based on semi-implicit parallelism and explicit thread-based
parallelism as well as more recent developments in the areas of software trans-
actional memory and nested data parallelism.
We also use the terms parallel and concurrent with quite specific meanings.
A parallel program is one which is written for performance reasons to exploit
the potential of a real puting resource like a multi-core processor.
For a parallel program we have the expectation of some genuinely simultaneous
execution. Concurrency