[E-Lang] Re: restricted concurrency and optimization (was Re: [E-Lang]
E FAQ)
Mark S. Miller
markm@caplet.com
Thu, 27 Sep 2001 21:51:57 -0700
At 09:40 PM Thursday 9/27/01, Wesley Felter wrote:
>This reminds me of some other thoughts I had about optimizing E runtimes.
>GC could be simplified if you know that all the code touching the GC heap
>is single-threaded. You could also avoid scanning the stack for GC roots
>by running the GC in between game turns (since there would be no E frames
>on the stack at that point). You wouldn't need complex thread-suspending
>logic or GC safe points in every loop.
Yes! The only precedents I know for GCing only when there are no stack
frames are Niklaus Wirth's Oberon system (which the world should have paid
more attention to) and Udanax Gold/Purple
http://www.udanax.com/gold/index.html http://www.sunless-sea.net/forum .
Both are event-loop systems.
If you want to do this, the hard question is: What happens if you run out of
space during a turn? I believe the least bad answer is to have two garbage
collectors. Yuck. But probably still wirth it. (Sorry)
Cheers,
--MarkM