[Haskell] Implicit parallel functional programming

Murray Gross mgross at dorsai.org
Wed Jan 19 13:31:19 EST 2005



On Wed, 19 Jan 2005, Jan-Willem Maessen wrote:

> On Jan 18, 2005, at 11:36 PM, mgross at dorsai.org wrote:
> > On Tue, 18 Jan 2005, Satnam Singh wrote:
> >
> >> I'm trying to find out about existing work on implicit parallel
> >> functional programming. I see that the Glasgow Haskell compiler has a
> >> parallel mode which can be used with PVM and there is interesting
> >> work with pH at MIT. Does anyone know of any other work on implicitly
> >> parallelizing functional programs for fine grain parallel execution?
> >>
> >> The emergence of multi-core processors makes me think that we should
> >> look at implicit parallel functional programming in a new light.
> >>
> > At Brooklyn College, we are working on a version of Parallel Haskell
> > that
> > does not require PVM. Instead, we use Internet protocols and the Mosix
> > patches to Linux.
>
> But what about Haskell for closely-coupled shared-memory
> multiprocessors?  These are the machines Satnam is talking about.  For
> a multipcore processor with shared caches, message passing is actively
> bad for performance; you *want* to share memory to prevent cache
> conflicts.  A first step would be to simply get GHC's RTS to work in
> multiple threads (harder than it looks, as the Simons have attested in
> the past).
>

The same approach we use will work for closely coupled multiprocessors,
although we will increase overhead slightly with message passing. The
trick here is to assure that the number of Haskell processes running on a
given processor is no greater than the number of processors, since moving
messages between virtual hosts on the loopback network is a low-overhead
operation. If it is larger, then we begin to introduce overhead from
process switching.

There are, of course, still problems at the lowest optimization levels,
such as cache optimization. Since we do not yet trust our system at the
higher levels, we are ignoring the lower level problems for the time
being.

Murray Gross
Brooklyn College



More information about the Haskell mailing list