chicken-users
[Top][All Lists]
Advanced

[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 08:02:43 +0100

On Fri, 11 Mar 2005 00:53:21 +0000, Julian Morrison
<address@hidden> wrote:
> 
> Problems:
> - Posix threads have seperate stacks. Stack allocated objects in one
> thread are unreachable from others.
> - Copying GC moves pointers in heap. If one thread does a copying GC,
> the others won't know where the pointers moved.
> 
> Possible solutions, respectively:
> - Do a minor GC as though stack space had run out, before starting each
> Posix thread.
> - Either
> --- access pointers indirectly through some means which makes their
> movement in heap transparent (evicted locatives?),
> --- or provide a mechanism to temporarily lock current (to be shared)
> objects against GC, which is called before any threading.

Locking/making immobile is (AFAICT) not possible - GC is just too
frequent, and too much interleaved with execution.

One way would be (and this isn't very much thought out, yet) to
allow "worker" threads, each in a separate kernel thread. The distinction
between stack and heap data would have to be generalized to allow
multiple stacks. An interesting problem...


cheers,
felix




reply via email to

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