mit-scheme-devel
[Top][All Lists]
Advanced

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

Re: [MIT-Scheme-devel] Symmetric MultiProcessing


From: Taylor R Campbell
Subject: Re: [MIT-Scheme-devel] Symmetric MultiProcessing
Date: Tue, 18 Aug 2015 22:39:22 +0000
User-agent: IMAIL/1.21; Edwin/3.116; MIT-Scheme/9.1.99

   commit 4781c478630f3c19373aea69cca3d2efac8154ee
   Author: Matt Birkholz <address@hidden>
   Date:   Tue Jun 23 11:42:13 2015 -0700

   But there is no need for default/gc-flip to remove items from the
   queue.  Flush-purification-queue! will know that its queue is "empty"
   when its head is in constant space.  Thus the interrupt no longer
   modifies the queue, and the queuing process is serialized in the usual
   way.

Naively reading from a data structure that another thread might be
modifying is not OK even if all modifications are covered by a mutex.

If you want to do this, then at the very least you must introduce
memory barriers so that the modifications will be transmitted from the
writer to the reader in a sane order -- or prove that the memory
barriers are not necessary for other reasons.

I'm also a little puzzled about the queue scheme.  It seems like now
we waste constant space for all the pairs that were used only for the
purpose of queueing objects to be purified.



reply via email to

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