<br><br><div><span class="gmail_quote">On 10/17/07, <b class="gmail_sendername">gruntfuttuck</b> <<a href="mailto:gruntfuttuck@gmail.com">gruntfuttuck@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>How is squeak going to handle multy-core CPUs, if at all? If we see cores of<br>100 plus in the future and squeak stay as it is, I would imagine other<br>languages such as erlang, will look more attractive.<br></blockquote>
</div><br>The answer seems pretty obvious: modify the VM to support them. I'll skim over the details which I'm sure everybody already knows.<br><br>My question is: what are we going to do with multi-core CPUs? The code in the image is almost all single threaded. Morphic freezes up when I run something in the workspace (!!). Smalltalkers just don't seem to understand multi-threaded code, even though the basic capabilities been available to them since day one.
<br><br>I use Futures now and then; I implemented them myself:<br><br>f := Future doing: [ some long computation ].<br>... insert more code here which runs in parallel with the long computation.<br>f printResult. "Will block until the long computation has returned the result into f and then print the result. "
<br clear="all"><br>I imagine that a parallel collection package would be possible to make:<br><br>c := ParOrderedCollection new. "or ParSet, ParBag..."<br>c addAll: lots of stuff.<br>c do: [ :each | each doSomething ]. "Will fork a Process for each element in c. "
<br>c map: [ :each | each transform] andGather: [ :each :sum | sum combineWith: each]. "Google's map and gather algorithm"<br><br>Object>>changed: can be modified to be parallel; this makes the dependents/updating framework parallel. I did this and the image seemed to work fine.
<br><br>There's heaps of parallel stuff you can do in Squeak. One day I'd like to have a crack at making the VM use pthreads more, but that will be the day after people actually start writing parallel code.<br><br>
Gulik.<br><br>-- <br><a href="http://people.squeakfoundation.org/person/mikevdg">http://people.squeakfoundation.org/person/mikevdg</a><br><a href="http://gulik.pbwiki.com/">http://gulik.pbwiki.com/</a>