[Stackless] Algorithm for Stackless Scheduler
andrewfr_ice at yahoo.com
Wed Nov 12 01:02:38 CET 2008
--- On Tue, 11/11/08, Jeff Senn <senn at maya.com> wrote:
Thanks for the explanation. There are parts of the scheduler algorithm where I am not entirely clear. I am particularly interested in knowing all the conditions when context switches occur.
(I started writing tests to examine behaviour)
> OR (depending on the channel preference) continue in the
> caller (inserting the sender/receiver at the "other
> end" onto runnables) or rotate the head of runnables to the >sender/receiver and pick up there.
Jeff, I am not clear on all the conditions under which a rotate happens.
Take the following: There are blocked tasklets on a channel (CH). The channel preference is -1 (receiver preference)
Blocked: C,C on CH
for i in range(0,MAX):
after the first iteration, do we have the following:
Runnable: C, P (a context switch)
Runnable: P, C
A test suggests the former (which would make sense)
In the case of sender preference -1, after P terminates, would I have
I am assuming in the case of sender preference (and a single producer many receivers), things are faster because fewer context switches occur.
Another question, at what stage is information transferred from the sender to the receiver?
More information about the Stackless