Philippe Marschall pravi:
>> Michael van der Gulik wrote:
>> So now it seems that Gemstone is the only multi-core capable SmalltalkWell, Gemstone can for sure be considered as multi-core capable. Every
>> VM :-(.
> AFAIK Gemstone isn't multi-core capable as well. You can just run
> multiple gems and they share the same persistent memory. Which is
> similar but different.
gem runs on its own process and therefore can run on its own CPU core.
All gems then share a Shared Memory Cache. So, a typical multi-core
scenario.
| sum1 sum2 |
sum1 := 0. sum2 := 0.
[ 1 to: 10000000 do: [ :i | sum1 := sum1 + 1 ] ] fork.
[ 1 to: 10000000 do: [ :i | sum2 := sum2 + 1 ] ] fork.
(I didn't try the above so there might be obvious bugs)
If a VM can't distribute the load for the above over two or more CPU cores, I consider its multi-core capabilities a hack. No offense intended to the Hydra VM.
I'm feeling a bit disheartened by the fact that there aren't any Smalltalk VMs, commercial or not, that can do fine-grained parallelism.
Gulik.
--