Next: About this document
Up: Strands
Previous: Appendix A:
Anatomy of a context switch between two user-level strands
- Suppose a user-level strand is executing in domain a.
- Clocktick event occurs. Suspended state pointer ( S) points to
this state ( X). When event handling is finished, ^S will be resumed.
- The handler for Clocktick is a piece of the global scheduler
that has registered to be executed in its own domain g.
- Scheduler raises Stop. Stop handler executes in its
registered domain a, and saves away as much state as it needs.
- Back to the scheduler in domain g. Scheduler changes the
saved state pointer S to point to a context that will execute
an idle loop.
- Scheduler changes the current domain to destination domain b.
- Scheduler raises Run.
- The Run handler should now change S to something that will
resume a user-level computation.
Emin Gun Sirer
Sat Jun 22 19:01:37 PDT 1996