c-user: Clarify task priorities

This commit is contained in:
Sebastian Huber 2021-09-14 19:18:31 +02:00
parent c81e148179
commit 5fdc744dce
3 changed files with 16 additions and 12 deletions

View File

@ -117,10 +117,7 @@ Task Priority and Scheduling
The most significant task scheduling modification mechanism is the ability for The most significant task scheduling modification mechanism is the ability for
the user to assign a priority level to each individual task when it is created the user to assign a priority level to each individual task when it is created
and to alter a task's priority at run-time. The maximum priority level depends and to alter a task's priority at run-time, see :ref:`TaskPriority`.
on the configured scheduler. A lower priority level means higher priority
(higher importance). The maximum priority level of the default uniprocessor
scheduler is 255.
.. index:: preemption .. index:: preemption

View File

@ -45,7 +45,7 @@ Deterministic Priority SMP Scheduler
A fixed-priority scheduler which uses a table of chains with one chain per A fixed-priority scheduler which uses a table of chains with one chain per
priority level for the ready tasks. The maximum priority level is priority level for the ready tasks. The maximum priority level is
configurable. By default, the maximum priority level is 255 (256 priority configurable. By default, the maximum priority level is 255 (256 priority
levels). levels), see :ref:`CONFIGURE_MAXIMUM_PRIORITY`.
.. _SchedulerSMPPrioritySimple: .. _SchedulerSMPPrioritySimple:
@ -64,6 +64,7 @@ Arbitrary Processor Affinity Priority SMP Scheduler
A fixed-priority scheduler which uses a table of chains with one chain per A fixed-priority scheduler which uses a table of chains with one chain per
priority level for the ready tasks. The maximum priority level is priority level for the ready tasks. The maximum priority level is
configurable. By default, the maximum priority level is 255 (256 priority configurable. By default, the maximum priority level is 255 (256 priority
levels). This scheduler supports arbitrary task processor affinities. The levels), see :ref:`CONFIGURE_MAXIMUM_PRIORITY`. This scheduler supports
worst-case run-time complexity of some scheduler operations exceeds arbitrary task processor affinities. The worst-case run-time complexity of
:math:`O(n)` while :math:`n` is the count of ready tasks. some scheduler operations exceeds :math:`O(n)` while :math:`n` is the count of
ready tasks.

View File

@ -127,13 +127,19 @@ scheduling of a task is based on its current state and priority.
.. index:: priority, task .. index:: priority, task
.. index:: rtems_task_priority .. index:: rtems_task_priority
.. _TaskPriority:
Task Priority Task Priority
------------- -------------
A task's priority determines its importance in relation to the other tasks A task's :term:`priority` determines its importance in relation to the other
executing on the same processor. RTEMS supports 255 levels of priority ranging tasks executing on the processor set owned by a :term:`scheduler`. Normally,
from 1 to 255. The data type ``rtems_task_priority`` is used to store task RTEMS supports 256 levels of priority ranging from 0 to 255. The priority
priorities. level 0 represents a special priority reserved for the operating system. The
data type :c:type:`rtems_task_priority` is used to store task priorities. The
maximum priority level depends on the configured scheduler, see
:ref:`CONFIGURE_MAXIMUM_PRIORITY`, :ref:`ConfigurationSchedulersClustered`, and
:ref:`RTEMSAPIClassicScheduler`.
Tasks of numerically smaller priority values are more important tasks than Tasks of numerically smaller priority values are more important tasks than
tasks of numerically larger priority values. For example, a task at priority tasks of numerically larger priority values. For example, a task at priority