[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SCM_DEFER_INTS versus error

From: Mikael Djurfeldt
Subject: Re: SCM_DEFER_INTS versus error
Date: Mon, 22 Sep 2003 21:01:03 -0400
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Marius Vollmer <address@hidden> writes:

> Kevin Ryde <address@hidden> writes:
>> Marius Vollmer <address@hidden> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]