Multy-core CPUs

Sebastian Sastre ssastre at seaswork.com
Mon Oct 22 19:28:58 UTC 2007


> >
> 
> A trivial code comes in mind:
> 
> (1 to: 1000) do: [:i |  [ aBlock value:i ] fork ]
> 
> but this leads to burden our parallel processes with scheduling.
> I would like, instead, to be able to run a number of parallel 
> branches for same process (to schedule a process instead each 
> of these branches).
> 
> (1 to: 1000) doInParallel: [:i |  aBlock value ]
> 
> I really don't like adding another abstraction like Thread, 
> in addition to Process. Maybe we should stick with a Process 
> and have a subclass of it, like ProcessNoScheduling.
> I'm just thinking, in what ways we can avoid excessive 
> scheduling/preempting?

Seems to me that OS process and native threads is not the best choice (too
costly to create, etc).

> Or maybe, by following road of 'erlangisation' we should make 
> a Process more lightweight, so spawning thousands of them 
> will not cause a speed degradation.
> 
Making process in Erlang is as cheap as creating objects in Smalltalk so
this how-to's are exactly the ones I think we can take a look in Erlang's VM
design/internals and/or talk with people familiar to Erlang VM. Would be
cool to meet them and have a smalltalk :) to see what goes from it

Cheers,

Sebastian

> 
> --
> Best regards,
> Igor Stasenko AKA sig.
> 




More information about the Squeak-dev mailing list