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

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

Reply via email to