help-smalltalk
[Top][All Lists]
Advanced

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

[Help-smalltalk] Processes in GNU Smalltalk


From: Gwenael Casaccio
Subject: [Help-smalltalk] Processes in GNU Smalltalk
Date: Thu, 19 May 2011 16:37:03 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10

Hi,

GNU Smalltalk and I guess most of the Smalltalk implementations,
only provide green threads, that means we have a share everything
approach with the others threads. We clearly lacks of a process isolation model in Smalltalk, I propose a model to have them with
a relative small cost. Since a process share nothing with the other
processes, we need to generate for each processes  a set of base
classes and objects (Object, Class, Array, ... with their compiled methods, a symbol table).

Separation has multiple advantages:
 - security
 - sandboxing
 - concurrency
 - resource management
 - ...

A simple and nice approach to have them in GNU Smalltalk is to add
a support for multiple SpecialObjectArray. SpecialObjectArray is a special object used for storing all the objects that the virtual machine knows for instance: true, false, nil, #doesNotUnderstand, the list of processes, ...

GST doesn't have a special object array in the VM because it has an object table and thus some objects positions are hard-coded, adding
a special object array could also help us for the OT removal ;-)

A new Domain class should be added it's the real process (and not thread) and the Process (the thread :D) class is extended with a new domain instance variable. The Domain class stores the special object array and thus each time the scheduler chooses another thread it has the process and can swap the special object array.

Cheers,
Gwen



reply via email to

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