caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jonathan Roewen <jonathan.roewen@gmail.com>
To: Richard Jones <rich@annexia.org>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Pre-emptive multitasking
Date: Mon, 13 Jun 2005 10:02:39 +1200	[thread overview]
Message-ID: <ad8cfe7e050612150211429723@mail.gmail.com> (raw)
In-Reply-To: <20050612101323.GA21947@furbychan.cocan.org>

> The GC isn't thread-safe. 

What would it take to make it thread-safe? I plan to make a custom
native code runtime anyway, so could try working on that problem
too...

> This means that when OCaml code runs, it
> must be protected by a global mutex.  If you have two threads running
> OCaml code, they will contend for this mutex, and run (around) 50% of
> the time each.  If you have two CPUs you won't gain any benefit. 

We plan on running separate runtimes for multi-processor systems.

> The standard solution would be to run one OCaml thread and lots of C
> threads

This is not a solution: we're going for an almost pure OCaml operating
system (need asm, etc). I'm more interested in the ins and outs of the
scheduler for pure OCaml threading. Such as, is it pre-emptive or
co-operative? What kind of runtime guarantees can it provide for near
realtime applications, etc.

Jonathan


  reply	other threads:[~2005-06-12 22:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-11 20:51 Jonathan Roewen
2005-06-12 10:13 ` Richard Jones
2005-06-12 22:02   ` Jonathan Roewen [this message]
2005-06-13  8:30     ` Benjamin Geer
2005-06-13 22:12       ` Jonathan Roewen

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=ad8cfe7e050612150211429723@mail.gmail.com \
    --to=jonathan.roewen@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=rich@annexia.org \
    /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).