<div dir="ltr">Another option mentioned occassionally:<div><a href="http://stefan-marr.de/renaissance/#get-started">http://stefan-marr.de/renaissance/#get-started</a><br></div><div>(roarvm - mutli-core (research) vm for squeak, tested on 'up to 59 cores').</div><div><br></div><div>-cbc</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 30, 2017 at 12:19 PM, Clément Bera <span dir="ltr"><<a href="mailto:bera.clement@gmail.com" target="_blank">bera.clement@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr">Hi all,<div><br></div><div>Tim's just shared this lovely article with a 10,000+ core ARM machine. With this kind of machines, it's a bit stupid to use only 1 core when you have 10,000+. I believe we have to find a way to introduce multi-threading in Squeak / Pharo. For co-processors like the Xeon Phi or the graphic cards, I guess it's ok not to use them because their not general purpose processors while the VM is general purpose, but all those 10,000 cores...</div><div><div><br></div><div>For parallel programming, we could consider doing something cheap like the parallel C# loops (Parallel.for and co). The Smalltalk programmer would then explicitly write "collection parallelDo: aBlock" instead of "collection do: aBlock", and if the block is long enough to execute, the cost of parallelisation becomes negligible compared to the performance boost of parallelisation. The block has to perform independent tasks, and if multiple blocks executed in parallel read/write the same memory location, as in C#, the behavior is undefined leading to freezes / crashes. It's the responsibility of the programmer to find out if loop iterations are independent or not (and it's not obvious).</div><div><br class="m_7128254633277827143gmail-Apple-interchange-newline">For concurrent programming, there's this design from E where we could have an actor model in Smalltalk where each actor is completely independent from each other, one native thread per actor, and all the common objects (including what's necessary for look-up such as method dictionaries) could be shared as long as they're read-only or immutable. Mutating a shared object such as installing a method in a method dictionary would be detected because such objects are read-only and we can stop all the threads sharing such object to mutate it. The programmer has to keep uncommon the mutation of shared objects to have good performance.</div><div><br></div><div>Both design have different goals using multiple cores (parallel and concurrent programming), but in both cases we don't need to rewrite any library to make Squeak / Pharo multi-threaded like they did in Java.</div><div><br></div><div>What do you think ? </div><div><br></div><div>Is there anybody on the mailing list having ideas on how to introduce threads in Squeak / Pharo in a cheap way that does not require rewriting all core/collection libraries ?</div><div><br></div><div>I'm not really into multi-threading myself but I believe the Cog VM will die in 10 years from now if we don't add something to support multi-threading, so I would like to hear suggestions.</div><div><br></div><div>Best,</div><div><br></div><div>Clement</div><div><br></div><div class="m_7128254633277827143gmail_signature"><div dir="ltr"><div><div>Phd Student</div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;line-height:16px;background-color:rgb(255,255,255)">Bâtiment B 40, avenue Halley 59650 </span><em style="font-weight:bold;font-style:normal;font-family:arial,sans-serif;line-height:16px;background-color:rgb(255,255,255)">Villeneuve d'Ascq</em></div></div></div></div>
</div></div>
<br></blockquote></div><br></div>