AMX Timing Control
K
A
DAK
79
5.4 Task Tim e SlicingAMX provides task time slicing as an option. The AMX system must be configured to
include a clock if time slicing is to be possible. Time slice intervals are then specified as
multiples of the AMX system tick.
Time slicing is normally disabled. It is enabled with a call to AMX procedure ajtson. It
can be disabled again with a subsequent call to ajtsof.
If your AMX System Configuration Module indicates that time slicing is required, AMX
will automatically enable time slicing by calling ajtson prior to executing any
application Restart Procedure at launch time.
Time slicing is a feature which coexists with the normal AMX preemptive priority-based
task scheduling. Whether or not a task is time-sliced depends on two things: the task's
execution priority and the task's time slice interval. Both of these parameters are first
defined when a task is created.
If a task's time slice interval is zero, the task will not be time sliced. A non-zero time
slice interval specifies the number of AMX system ticks which will be given to the task
before the task is forced to relinquish the processor to another time sliced task.
A task is time sliced with all other tasks having the same execution priority and a non-
zero time slice interval. A set of time sliced tasks are normally created to share a
particular execution priority. Tasks which are not time sliced (their time slice interval is
zero) are usually assigned to different execution priority levels. More than one set of
time sliced tasks can be created, each set existing at a different priority level. Other tasks
can reside at priorities between the time sliced sets.
The order in which tasks at a particular shared priority level are given their time slice by
AMX is determined by the chronological order in which the tasks were created.