[<<][c][>>][..]
Tue Nov 18 16:17:20 CET 2008
Implementing CSP in a single thread.
Apparently, "CSP semantics" for conditions are inefficient to
implement. One usually chooses for "Mesa semantics", where setting a
condition does not mean a yield, which means that the condition can
change before signalled tasks are effectively woken up. The remedy is
to always check the condition after wake-up (loop before you leap!)
http://www.cs.duke.edu/courses/spring01/cps110/slides/sem/sld005.htm
But as far as I can see CSP semantics are only inefficient if task
switches are expensive. The idea is probably that task switches can
be limited if a single thread sets more than one condition in a row.
So, when task switches are cheap (stack machines), this problem goes
away? I'd like to implement this in Staapl.
[Reply][About][<<][c][>>][..]