Version française
Home     About     Download     Resources     Contact us    
Browse thread
Faking concurrency using Unix forks and pipes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: luc.maranget@i...
Subject: Re: [Caml-list] Faking concurrency using Unix forks and pipes
> 
> Has anyone implemented a parallel map function in OCaml using Unix forks, 
> pipes and maybe marshalling?
> 
> This seems like an easy way to get concurrency in OCaml...
> 
> -- 
> Dr Jon D Harrop, Flying Frog Consultancy Ltd.
> OCaml for Scientists
> http://www.ffconsultancy.com/products/ocaml_for_scientists/?e


This is what we did for a a few examples of using JoCaml,
the soon-to-be-released extension of OCaml for concurrent programming.

Fork/Exec is an easy way to get simultaneous execution.

JoCaml is not released yet, (I am writting the doc
and web site at the moment).

The much incomplete web site is at
<http://jocaml.inria.fr>

One example of fork under jocaml control
<http://jocaml.inria.fr/manual/concurrent.html#htoc25>

The example may not meet all your concerns (speed I guess),
but you can replace the shell in the example by somme
C or Ocaml program that computes something and refine the control
to collect results.


Hope it helps.

-- 
Luc Maranget