AMX Timing Control
K
A
DAK
81
Time slicing can be completely disabled at any time with a call to AMX procedure
ajtsof. Procedure ajtson can then be used to enable time slicing.
Task time slice intervals can be dynamically adjusted using AMX procedure ajtslv to
fine tune the shared use of the processor based on observed effects.
The starting and ending of time sliced tasks are not synchronized to the AMX clock.
However, switching between time sliced tasks will only occur at AMX system ticks
because the switch is initiated by the AMX Kernel Task.
It should be noted that if higher priority tasks frequently interrupt a time sliced task, the
exact processing time allocated to the task will not exactly equal n*t where n is the task's
time slice interval and t is the AMX system tick period. The task will be forced to
relinquish the processor after the n'th system tick which occurs while the task is
executing. However, because of higher priority task activity, the task did not get the use
of the processor for the entirety of each of its n system ticks.
Finally, if a task is time sliced and all other tasks at the same execution priority are idle or
blocked, a time slicing overhead penalty will still exist. The AMX Kernel Task will
continue to interrupt the task at its time slice interval, conclude that task switching is
unnecessary and resume execution of the interrupted task.
Suggestion
Do not use time slicing unless its use is warranted. Better
use of processor time results if tasks are allowed to run to
completion.
Misuse is abuse!