On Apr 13, 2005, at 8:49 PM, itsme213 wrote:

> "Peter Suk" <peter.kwangjun.suk / mac.com> wrote in message
>
>> If you can enforce that no one writes into a
>> partition from outside of it (including the immutables), then you can
>> safely give each one its own thread.
>
> IIRC, this is an extremely difficult thing to check. My recollection is
> based on work from a while ago on aliasing, islands, etc.

If the VM is doing this, then you can do this efficiently by comparing 
pointers.  I've tried constructing write barriers above the level of 
the VM in Smalltalk (manipulating compilation), and yes, it's 
difficult.  You only need one "leak" and this invalidates the whole 
barrier.  But the VM can partition the object-space very efficiently 
and by doing it at such a low level, it is much more secure.  VMs do 
precisely this sort of partitioning to implement garbage collection 
algorithms.

You could do this in Squeak by using the VM simulator and collections 
for your partitions.  It wouldn't be as efficient, but it should be as 
secure.  (So if we succeed in moving Ruby on top of Squeak VM with the 
Alumina project, we could do this for Ruby!)

--Peter


--
There's neither heaven nor hell, save what we grant ourselves.
There's neither fairness nor justice, save what we grant each other.