ObjectSpaces for GST and VM ideas

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ObjectSpaces for GST and VM ideas

MrGwen
Hi Paolo,

I rewrite the implementation of the ObjectSpaces for GST, you can look
on my GST fork inside the branch object-space. This clean up is really
better :
  - I use macros instead of _object_space[_current_space].myField
  - no more inside the oop.h
  - new files :
       system-dict which contains the structure with all the class name
       object-space : object-space it self

 At this time I've not merged the security work on the branch and the
multi image support ;) I'll try to do to soon as possible.

ObjectSpaces are a kind of software process isolation in Smalltalk the
interest is :

This is really nice we can prevent big allocation :
   OrderedCollection new: 10.....0.
We can disable some primitives useful :
   ObjectMemory quit :)
Of course writing on external ObjectSpace can be impossible :
   Array := 1 :D.
   myExternalRef instVarAt: 1 put: ...
An other nice property is :
   Array allInstances will only returns instances inside the
ObjectSpace

I've also an idea : thread each spaces with a vm thread and use a
message queue when you send a message to an external ObjectSpaces.

Also I've  made a copy on write for strings with a VM support ( not
finished patch ) and a largeOOP prototype with a BTree support : I
should extend the GC to support BTree.

For a 3.3 version of GST ;)

Gwen



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: ObjectSpaces for GST and VM ideas

Nicolas Petton
Finally, I can read the code and play with it as it deserves!

That's super cool :)

Nico

Le lundi 25 janvier 2010 à 10:47 +0100, Gwenael Casaccio a écrit :

> Hi Paolo,
>
> I rewrite the implementation of the ObjectSpaces for GST, you can look
> on my GST fork inside the branch object-space. This clean up is really
> better :
>   - I use macros instead of _object_space[_current_space].myField
>   - no more inside the oop.h
>   - new files :
>        system-dict which contains the structure with all the class name
>        object-space : object-space it self
>
>  At this time I've not merged the security work on the branch and the
> multi image support ;) I'll try to do to soon as possible.
>
> ObjectSpaces are a kind of software process isolation in Smalltalk the
> interest is :
>
> This is really nice we can prevent big allocation :
>    OrderedCollection new: 10.....0.
> We can disable some primitives useful :
>    ObjectMemory quit :)
> Of course writing on external ObjectSpace can be impossible :
>    Array := 1 :D.
>    myExternalRef instVarAt: 1 put: ...
> An other nice property is :
>    Array allInstances will only returns instances inside the
> ObjectSpace
>
> I've also an idea : thread each spaces with a vm thread and use a
> message queue when you send a message to an external ObjectSpaces.
>
> Also I've  made a copy on write for strings with a VM support ( not
> finished patch ) and a largeOOP prototype with a BTree support : I
> should extend the GC to support BTree.
>
> For a 3.3 version of GST ;)
>
> Gwen
>
>
>
> _______________________________________________
> help-smalltalk mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/help-smalltalk

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ObjectSpaces for GST and VM ideas

Paolo Bonzini-2
In reply to this post by MrGwen
On 01/25/2010 10:47 AM, Gwenael Casaccio wrote:
> Hi Paolo,
>
> I rewrite the implementation of the ObjectSpaces for GST, you can look
> on my GST fork inside the branch object-space. This clean up is really
> better :

That's all _really_ great.

>    - I use macros instead of _object_space[_current_space].myField

Yes, if we want to move away from macros we should use a semantic
patching tool instead of search-and-replace.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [Help-smalltalk] ObjectSpaces for GST and VM ideas

MrGwen
On Mon, 2010-01-25 at 11:25 +0100, Paolo Bonzini wrote:

> On 01/25/2010 10:47 AM, Gwenael Casaccio wrote:
> > Hi Paolo,
> >
> > I rewrite the implementation of the ObjectSpaces for GST, you can look
> > on my GST fork inside the branch object-space. This clean up is really
> > better :
>
> That's all _really_ great.
>
> >    - I use macros instead of _object_space[_current_space].myField
>
> Yes, if we want to move away from macros we should use a semantic
> patching tool instead of search-and-replace.
>
> Paolo

A little improvement : the vm state (ip, sp, some caches, ...) is now
inside a struct (the refactoring is not yet finished but it is a
question of days ^^) so a multi threaded vm will be very easy . I should
pay attention to the GC I'll have certainly a lot of questions Paolo ;)

Also I was thinking of implementing a server for the primitives :
  * for security (i.e. a multi user vm )
  * for safety (hummm a *crash* of GTK for example :D)
  * extensibility (for each space a different server of prims, ...)

Look at this paper if you're interested :
research.sun.com/projects/barcelona/papers/usenix03.pdf

Gwen



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk