5.1. Introduction#
The scheduling concepts relate to the allocation of processing time for tasks.
The concept of scheduling in real-time systems dictates the ability to provide an immediate response to specific external events, particularly the necessity of scheduling tasks to run within a specified time limit after the occurrence of an event. For example, software embedded in life-support systems used to monitor hospital patients must take instant action if a change in the patient’s status is detected.
The component of RTEMS responsible for providing this capability is appropriately called the scheduler. The scheduler’s sole purpose is to allocate the all important resource of processor time to the various tasks competing for attention. The directives provided by the Scheduler Manager are:
rtems_scheduler_ident() - Identifies a scheduler by the object name.
rtems_scheduler_ident_by_processor() - Identifies a scheduler by the processor index.
rtems_scheduler_ident_by_processor_set() - Identifies a scheduler by the processor set.
rtems_scheduler_get_maximum_priority() - Gets the maximum task priority of the scheduler.
rtems_scheduler_map_priority_to_posix() - Maps a Classic API task priority to the corresponding POSIX thread priority.
rtems_scheduler_map_priority_from_posix() - Maps a POSIX thread priority to the corresponding Classic API task priority.
rtems_scheduler_get_processor() - Returns the index of the current processor.
rtems_scheduler_get_processor_maximum() - Returns the processor maximum supported by the system.
rtems_scheduler_get_processor_set() - Gets the set of processors owned by the scheduler.
rtems_scheduler_add_processor() - Adds the processor to the set of processors owned by the scheduler.
rtems_scheduler_remove_processor() - Removes the processor from the set of processors owned by the scheduler.