From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Re: SCM_DEFER_INTS versus error Date: Mon, 22 Sep 2003 21:01:03 -0400 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <87el0028c2.fsf@zip.com.au> <87ekyf9g50.fsf@zagadka.ping.de> <87r82bxbx0.fsf@zip.com.au> <87oexcd78h.fsf@zagadka.ping.de> Reply-To: djurfeldt@nada.kth.se NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1064279483 17241 80.91.224.253 (23 Sep 2003 01:11:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Sep 2003 01:11:23 +0000 (UTC) Cc: djurfeldt@nada.kth.se, guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Sep 23 03:11:20 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A1bi4-0008FM-00 for ; Tue, 23 Sep 2003 03:11:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A1bfN-0001TJ-BV for guile-devel@m.gmane.org; Mon, 22 Sep 2003 21:08:33 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 1A1bey-0001Mx-Lt for guile-devel@gnu.org; Mon, 22 Sep 2003 21:08:08 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 1A1bev-0001La-1E for guile-devel@gnu.org; Mon, 22 Sep 2003 21:08:05 -0400 Original-Received: from [213.212.20.77] (helo=kvast.blakulla.net) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A1bYD-0008B7-NF for guile-devel@gnu.org; Mon, 22 Sep 2003 21:01:09 -0400 Original-Received: from linnaeus ([18.42.2.46] helo=witch ident=mail) by kvast.blakulla.net with esmtp (Exim 3.36 #1 (Debian)) id 1A1bYA-0008Lh-00; Tue, 23 Sep 2003 03:01:06 +0200 Original-Received: from mdj by witch with local (Exim 3.35 #1 (Debian)) id 1A1bY7-0000j2-00; Mon, 22 Sep 2003 21:01:03 -0400 Original-To: Marius Vollmer In-Reply-To: <87oexcd78h.fsf@zagadka.ping.de> (Marius Vollmer's message of "Mon, 22 Sep 2003 20:10:38 +0200") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2819 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2819 Marius Vollmer writes: > Kevin Ryde writes: > >> Marius Vollmer 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