[Vm-dev] Ideas on cheap multi-threading for Squeak / Pharo ? (from Tim's article)
smalltalk at stefan-marr.de
Tue Jan 31 14:38:09 UTC 2017
> On 31 Jan 2017, at 15:22, Levente Uzonyi <leves at caesar.elte.hu> wrote:
>> Also the question is does it really need to be objects? Alternatives include things like tuple spaces (think Linda), low-level shared memory buffers (Python and others, and apparently ECMAScript 2017).
> You'd actually share a segment with objects stored in it. Low-level buffers are very restricting. They force you to serialize objects if you want to keep using them. And that has some unwanted overhead.
What’s a segment? Who controls the lifetime of it? Are you doing local GC plus global reference counting?
Somehow you’d still manage those objects, no?
>> If you go with objects, the problem is that you need to support GC. And, I suppose Eliot will agree that GC for multithreaded systems isn’t exactly zero cost.
> You don't need multi-threaded GC here, just many independent single-threaded GCs, which we have already.
> Btw, this is the same thing Erlang does.
I am probably missing something, but I’d think you need some global GC mechanism. If you got shared objects, you need to coordinate the local GCs.
In Erlang, most messages are copied, only large data chunks are shared by reference. So, that restricts the need for globally coordinated GC quite a bit, but you still need it as far as I can tell.
Johannes Kepler Universität Linz
More information about the Vm-dev