[Vm-dev] VM Maker: VMMaker.oscog-eem.2060.mcz

Eliot Miranda eliot.miranda at gmail.com
Sun Jan 1 02:26:04 UTC 2017


Hi Levente,

On Sat, Dec 31, 2016 at 11:45 AM, Levente Uzonyi <leves at caesar.elte.hu>
wrote:

>
> Hi Eliot,
>
> I'm no expert in C programming, but I suppose a global counter could be
> used to ensure that no other threads have modified the array before
> swapping the pointers.
>

I think one uses exactly the strategy you used in the Smalltalk code,
namely:
    if the structure needs growing, create a grown initialised copy, and
then do a test-and-set to update the pointer.


> Btw, I thought that object pinning would make it possible to get rid of
> the external semaphore table altogether. We need different plugin code for
> that, but I think it would be simpler and more efficient.
>

Well, I think pinning should help with a number of things.  But I don't see
how it suffices here.  Making signal thread-safe is probably quite
difficult, so the indirect request signal/grant signal scheme that the
external semaphore table provides is convenient.  What am I missing?

Why is #at:put: not thread-safe? Isn't it a primitive, so that no
> suspension point occurs provided both arguments are valid?
>

Ah, good point!  That's not obvious :-).  I'll change my comment :-)  Cool,
man!



> Happy New Year!
>
> Levente
>

Have a great year!  And good wishes to everyone!

_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20161231/1b6f2ff2/attachment.html>


More information about the Vm-dev mailing list