From: Philippe Wang <Philippe.Wang@lip6.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] "ok with parallel threads" GC (aka ocaml for multicore)
Date: Thu, 16 Apr 2009 11:45:32 +0200 [thread overview]
Message-ID: <9E5A9BDB-2A67-45DC-A963-AA45B7E1693B@lip6.fr> (raw)
In-Reply-To: <CAA74566-A3A9-4F80-90D0-3E555944928E@lip6.fr>
> Le 14 avr. 09 à 12:21, Philippe Wang a écrit :
>
>> 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 ?
No, it isn't. (And it would probably too often prevent parallel
threads, wouldn't it.)
> 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").
It should be, unless bugs are still hiding under that.
It is supposed to have been done for a while. We'll make one more check.
> 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 ?
- local variable instead of global variable in functions
- some functions are parameterized by thread identifier (that is, one
more parameter than "before") (e.g. in amd64.S)
Philippe Wang
next prev parent reply other threads:[~2009-04-16 9:45 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
2009-04-16 9:45 ` Philippe Wang [this message]
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=9E5A9BDB-2A67-45DC-A963-AA45B7E1693B@lip6.fr \
--to=philippe.wang@lip6.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