[ANN] Hydra now can do mitosis

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

[ANN] Hydra now can do mitosis

Igor Stasenko
 
Hello lists,

(see http://en.wikipedia.org/wiki/Cell_division for explanation what
mitosis is ;)

i just finished another torturing session in slang land, and finally
made some of it working :)

I added a two new primitives, which aimed towards creating a new heap
by cloning a designated set of objects from existing one.
A first primitive is helps you to create a closed graph by reporting a
set of objects which is referenced by objects in provided array, but
not included in this array itself.

A second primitive is actually serves for creating a baby heap.
I takes two array arguments: objects graph, and replacements (or substitutions).

The rules is simple:
each object included in first array, should have references to objects
which included in this array as well i.e.
(objects identityIncludes: (objects at: x) someIvar ) == true

or if its not , then it can be found in a substitutions array.
A substitutions array is a flat array of pairs oop -> index, where oop
can be any oop, and index is a smallint index of item in objects
array.
Upon creation of new heap, all refs to oops in 'substitutions' array
will be replaced by refs from 'objects' array by taking corresponding
index.

Both array arguments should contain oops only (except from indexes in
substitutions array) , should not contain duplicates and their
intersection should be empty , i.e.
  (objects intersection: substitutions) isEmpty == true.

All of these rules actually serving to ensure that newly created
object memory will form a fully closed graph (hence its oops can be
cloned to a standalone object memory).

There are also, an initial example how to create a 'baby' object memory
load http://www.squeaksource.com/HydraVM/HydraVM-sig.17.mcz

and do:

HydraClone new cloneIdleProcess

Of course you will need new VM.
Sorry, i didn't published an update of sources yet. I can only give
you a prebuilt one.
Once i had a write access to ftp.squeak.org/HydraVM but i forgot
credentials/key to it. (if Box Admins help me with this, i will upload
it there).
Or, you can write me in private and i will send you binaries.

P.S. I want to give a credit to Klaus D. Witzel who helped me to
finish these new features, and inspired to do it :)


--
Best regards,
Igor Stasenko AKA sig.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Hydra now can do mitosis

Igor Stasenko
 
Update.
you can download binaries from here
ftp://ftp.squeak.org/HydraVM/latest_builds/win32/HydraVM-bin-22.02.2009.zip

--
Best regards,
Igor Stasenko AKA sig.
Reply | Threaded
Open this post in threaded view
|

n-core Smalltalk at work [Re: Hydra now can do mitosis]

Klaus D. Witzel
 
On Sun, 22 Feb 2009 14:36:30 +0100, Igor Stasenko wrote:

> Update.
> you can download binaries from here
> ftp://ftp.squeak.org/HydraVM/latest_builds/win32/HydraVM-bin-22.02.2009.zip
>

Let me add 2-3 bits: first we also have to thank Alexandre "Alex" Bergel  
and Guillermo "Guille" Adri├ín Molina for discussing with us earlier  
approaches to running Smalltalk on n-core CPUs in parallel.

2nd: what expression (HydraClone new cloneIdleProcess) does for you, is it  
runs the computational task which is described by the corresponding object  
subgraph, in a *new* native thread (with own heap and instance of  
HydraVM). Therefore, on your n-core CPU you can expect that computation is  
spread among the cores. The #cloneIdleProcess example does just what its  
name says: it runs Smalltalk's idle process ;) as proof of concept.

You Smalltalkers may have other Smalltalk processes that you want to run  
in parallel on their own native thread; let us know how we can help you  
with that.

And in case you need communication between two or more .images, Hydra  
comes with its channel facility.

/Klaus

--
"If at first, the idea is not absurd, then there is no hope for it".  
Albert Einstein