unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mikael Djurfeldt <djurfeldt@nada.kth.se>
Cc: djurfeldt@nada.kth.se, guile-devel@gnu.org
Subject: Re: SCM_DEFER_INTS versus error
Date: Mon, 22 Sep 2003 21:01:03 -0400	[thread overview]
Message-ID: <xy7u174b9o0.fsf@nada.kth.se> (raw)
In-Reply-To: <87oexcd78h.fsf@zagadka.ping.de> (Marius Vollmer's message of "Mon, 22 Sep 2003 20:10:38 +0200")

Marius Vollmer <mvo@zagadka.de> writes:

> Kevin Ryde <user42@zip.com.au> writes:
>
>> Marius Vollmer <mvo@zagadka.de> writes:
>>>
>>> Right now (if I'm still uptodate), only one thread can
>>> execute 'in Guile',
>>
>> Oh, I thought you'd said previously there could be concurrent such
>> threads.  (I'd meant to try to work up a section for the manual on
>> such things.)
>
> What are you referring to precisely?  We do use concurrent threads,
> but we (currently) restrict them to cooperate so that only one of them
> has access to Guile data structures at any one time.  (We have the
> equivalent of the Big Kernel Lock.)  When a thread might block or has
> executed long enough, it leaves Guile-mode temporarily, allowing the
> next thread to execute.

Well, that was the situation with your COPT threads.  The current
PTHREADS thread support of HEAD actually allow true concurrent access
to Guile data structures.  The "kernel lock" is only used to force
single-threaded GC.  The rest of the time, threads run in parallel.

It has been tested with promising results on an dual-CPU SMP machine.
I now have access to a four-CPU machine and hope to be running Guile
on it in the near future.

The concept of "Guile-mode" is still required, though: A thread must
be in Guile-mode in order to access Guile data structures.  This makes
it possible for the GC to guarantee that the HEAP is untouched during
GC and that all Guile data structures are in a well-defined state.

Mikael


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2003-09-23  1:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-05  1:37 SCM_DEFER_INTS versus error Kevin Ryde
2003-09-17 22:58 ` Marius Vollmer
2003-09-19 20:34   ` Tom Lord
2003-09-22 18:01     ` Marius Vollmer
2003-09-20 23:44   ` Kevin Ryde
2003-09-22 18:10     ` Marius Vollmer
2003-09-23  1:01       ` Mikael Djurfeldt [this message]
2003-10-07 17:54         ` Marius Vollmer
2003-12-06 21:15       ` Kevin Ryde

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=xy7u174b9o0.fsf@nada.kth.se \
    --to=djurfeldt@nada.kth.se \
    --cc=guile-devel@gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).