guile-devel
[Top][All Lists]
Advanced

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

Re: gc issues


From: Dirk Herrmann
Subject: Re: gc issues
Date: Tue, 19 Sep 2000 11:48:31 +0200 (MEST)

> > Yes, and as it seems, threading on multiprocessors forces us to use locks
> > for cell initialization anyway (except I am missing something).  But, on
> > the other hand, if we have to use a lock in order to obtain every single
> > cell, would we still need a thread-private freelist at all?
> 
> yes.  you may need interlocking between mutators and the GC, but
> there's no reason to require interlocking between mutators themselves
> -- you'll just serialize all allocation this way.

Hmmm.  I am not (yet) an expert with threads, but it seems that, in order
to do this, you would need a separate mutex for every thread that is
running.  Not a big problem, though:  You could have a global list of
thread mutexes for gc.  Every thread locks its own mutex to obtain a new
cell from its private pool, while gc has to lock them all.  Maybe, gc has
only to lock the one for the thread the stack of which is is currently
scanning?  This would allow other threads to run during gc until their
private cell pool is empty.

Still, am I right saying that due to the multiprossor issue we _need_
locking to obtain a new cell?  Or am I missing something?

Best regards
Dirk



reply via email to

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