![]() |
Home |
|
Function RTKTimeSliceThe term time slicing denotes forced task switches after a fixed time interval if other tasks with the same priority as the active task are ready. Function RTKTimeSlice activates this algorithm: void RTKTimeSlice(RTKDuration Ticks); ParametersTicksDefines the maximum time interval a task is allowed to run before another task is activated. If Ticks <= 0, time slicing is disabled (RTKernel-32's default). Time slicing only takes effect when several tasks having the same priority are ready and no tasks having a higher priority can run. If, for example, three tasks of priority 7 are ready and another of priority 8, only the task of priority 8 will run. As soon as this task blocks itself, however, the other three are activated in turn after Ticks timer ticks. It is not required to activate preemptions for time slicing. During cooperative scheduling, time slice task switches are not triggered by the timer interrupt handler. Instead, they are performed in the next kernel call, if required.
|