[E-Lang] Speaking of Community Process: Memory Model & Threads

Mark S. Miller markm@caplet.com
Sun, 08 Jul 2001 22:54:00 -0700


At 05:56 PM Sunday 7/8/01, Dan Bornstein wrote:
>My understanding is that most of the problems happen when multiple threads
>access the same memory at the same time[*]. 

AFAIK, *all* of the problems under discussion.  If there's an exception to 
this, we desperately need to hear about it.

>Since all user code ends up
>happening in a single thread in the current implementation(s), having user
>code do something wrong isn't an issue. 

Correct.

>Whatever problems E has are
>probably all about how E's TCB (which does rely on multiple threads)
>intercommunicates.

I'm not sure about "intercommunicates", but yes, all the issues are how E's 
TCB internally uses Threads and does Thread-based concurrency control.  All 
these can easily be fixed without affecting the E programmer at all.

>That being said, the fact that a (relatively) small number of runs of
>programs seem to work okay isn't a huge assurance that E doesn't hit the
>weird cases at all, since this sort of problem doesn't reliably manifest
>itself unless you work hard at getting it to. (See the example code linked
>from the memory model discussion page.)

Correct.  That's what makes this kind of problem so scary.


>Marc Stiegler writes:
>>Unless they have changed something very recently, every E program I have run
>>on Solaris jvms has run identically to the E program on Linux and Windows.
>>Which is to say, among other things, that Solaris currently passes all our
>>QA tests, for better or for worse. 

None of our QA tests to date have remotely attempted to test for this kind 
of problem.  As Dan implies, statistical success means very little for such 
problems.  Fortunately, the optimizations which cause these problems seem to 
be absent on non-Solaris uni-processor JVMs (IS THIS REALLY TRUE??), so it 
seems the current implementations of E are not threatened on these platforms.


>We should revisit this matter when
>>version 10.0 of E is released.

I assume you meant to type "1.0"?


        Cheers,
        --MarkM