caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: xclerc <xavier.clerc@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] "ok with parallel threads" GC (aka ocaml for multicore)
Date: Tue, 14 Apr 2009 16:18:18 +0200	[thread overview]
Message-ID: <C9498815-D43F-4142-B2A4-C4D3D41CA8B8@inria.fr> (raw)
In-Reply-To: <CAA74566-A3A9-4F80-90D0-3E555944928E@lip6.fr>


Le 14 avr. 09 à 12:21, Philippe Wang a écrit :

> On Apr 10, 2009, at 20:36 CEDT, forum@x9c.fr wrote:
>
>> Would it be correct to assume that the current state of the project
>> implies that you have patched the OCaml runtime to make it
>> fully reentrant ?
>
> Is this following partial answer relevant enough ?
> The garbage collector is clearly separated from the rest of the  
> runtime library: the GC is contained in a libgc.a and our patched  
> ocamlopt links programs to this GC. The GC variables are known by  
> the GC only.

Well, this is not what I had in mind, but I realize that my question
was not clear. A better question would have been:
	Is your implementation still based on a global runtime lock ?

A negative answer would imply that you patched the OCaml
runtime to make it reentrant. To illustrate my point, I will take
the example of the file "byterun/compare.c". In this file, the
code for the comparison of values makes use of a global
variable (named "caml_compare_unordered").

So, allowing multiple threads to execute primitives from the
runtime at the same time may result in incorrect outcomes.
Unless you patch the runtime to make it reentrant, hence my
original (foolishly indirect) question.

If you patched the runtime to allow multiple threads to use
it concurrently, I would also be interested by the strategy
used: is the problem solved by additional parameters ?
by the use of thread-local storage ? by any other mean ?


Xavier Clerc


  reply	other threads:[~2009-04-14 14:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-10 17:04 Philippe Wang
2009-04-10 20:52 ` [Caml-list] " Jon Harrop
2009-04-10 23:20 ` Jerome Benoit
     [not found] ` <BB3C091F-3BE9-4883-A7CF-9D672CDDF829@x9c.fr>
2009-04-14 10:21   ` Philippe Wang
2009-04-14 14:18     ` xclerc [this message]
2009-04-16  9:45     ` Philippe Wang
2009-04-17 22:15       ` Philippe Wang
2009-04-17 22:20         ` Joel Reymont
2009-04-17 22:29           ` Philippe Wang
2009-04-17 23:05         ` forum
2009-04-23 16:49         ` Philippe Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C9498815-D43F-4142-B2A4-C4D3D41CA8B8@inria.fr \
    --to=xavier.clerc@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).