next up previous
Next: Wakeup Predicates Up: Internal Structure of XOK/ExOS Previous: Environments


The kernel multiplexes the processor by dividing it into time slices of a fixed number of ticks. An environment may then allocate time slices in order to be scheduled on the processor. By default, the kernel runs each time slice for the specified number of ticks and then switches to the next time-slice, in order. A time slice may also be marked as sleeping in which case the kernel will skip it and not deduct any ticks from that slice. When the kernel has cycled through all slices in the system it replenishes the ticks of each slice up to a maximum.

A process may donate the rest of its time slice to either a specified environment or to any environment via the yield ExOS call[*].

A process may also put itself to sleep by setting it's u_status to U_SLEEP and another process can wake that process up by setting the process's u_status to U_RUN. Note the problem that once a process goes to sleep it has to rely on some other process to wake it up. To get around this problem, wakeup predicates can be used.


Thomas Pinckney