[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Posix threading
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] Posix threading |
Date: |
Fri, 11 Mar 2005 10:12:47 +0100 |
On Fri, 11 Mar 2005 09:41:08 +0100, Peter Busser <address@hidden> wrote:
>
> > Perhaps Posix threaded programs could work, provided they only rely upon
> > "evicted" shared data?
>
> If each stack evicts its own stack, this means that the heap is accessed
> concurrently and needs to be protected against this, because it will lead to
> race conditions and therefore corruption.
>
Exactly.
But (slightly diverging from the original subject), with a non-preemptive
(i.e. cooperative) scheduling policy, as for example provided by GNU Pth,
one could run several stacks concurrently. This makes callouts to C
with dynamic-extent possible: C stack frames can then be GC'd. Also,
callback handling would be simpler. Effectively this means creating
a separate C stack for a call into C that might callback into Scheme.
[IIRC Bruce Butterfield suggested this some time ago]
Anyway, to share a common global heap, threads would be to
be synchronized at every minor GC, which is very often.
cheers,
felix
- Re: [Chicken-users] Posix threading, (continued)
- Re: [Chicken-users] Posix threading, Julian Morrison, 2005/03/10
- Re: [Chicken-users] Posix threading, felix winkelmann, 2005/03/11
- Re: [Chicken-users] Posix threading, Julian Morrison, 2005/03/11
- Re: [Chicken-users] Posix threading, felix winkelmann, 2005/03/11
- Re: [Chicken-users] Posix threading, Peter Busser, 2005/03/11
- Re: [Chicken-users] Posix threading, Julian Morrison, 2005/03/11
Re: [Chicken-users] Posix threading, felix winkelmann, 2005/03/11
Re: [Chicken-users] Posix threading, Peter Busser, 2005/03/11
- Re: [Chicken-users] Posix threading,
felix winkelmann <=