next up previous
Next: Kernel Strand Package Up: Strand Interface Previous: Events Handled by

Events Handled by Strand Schedulers

PROCEDURE Block(strand: REFANY);

This event indicates that the named strand is not eligible for execution and should no longer be scheduled. A blocked thread should not be Run by the scheduler until an Unblock occurs. A typical response from a scheduler module would be to save away current state (with Stop), make an indication that the current thread is no longer runnable and pick a new one to run.

Failure to comply might possibly result in garbled execution, or lack of forward progress by the named strand.

Examples: VM or synchronization subsystems would raise this event to suspend the execution of a process.

PROCEDURE Unblock(strand: REFANY);

This event indicates that the named strand is eligible for execution and should be scheduled. Failure to comply results in denial of service to the named strand.

Examples: The VM interface, for instance, would use this event to unblock a spindle that is blocked waiting on some paging activity.

PROCEDURE Yield();

This event indicates that the currently running entity has relinquished the processor. A typical scheduler would pick a new runnable strand and raise Run on it.

PROCEDURE Current() : REFANY;

This event returns the identity of the currently running strand. The identity is a piece of software state that is updated through the context switches.



Emin Gun Sirer
Sat Jun 22 19:01:37 PDT 1996