summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/ChangeLog7
-rw-r--r--doc/user/conf.t56
-rw-r--r--doc/user/schedule.t52
3 files changed, 113 insertions, 2 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 7cd78912b6..49205f8c77 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,10 @@
+2010-11-24 Gedare Bloom <giddyup44@yahoo.com>
+
+ PR 1647/cpukit
+ * user/conf.t, user/schedule.t: Update documentation to reflect
+ refactoring of SuperCore to add Scheduler and ability for user to
+ configure a scheduler.
+
2010-11-11 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1716/doc
diff --git a/doc/user/conf.t b/doc/user/conf.t
index 6fcaaa1398..e46af8efd0 100644
--- a/doc/user/conf.t
+++ b/doc/user/conf.t
@@ -24,6 +24,7 @@ RTEMS must be configured for an application. This configuration
information encompasses a variety of information including
the length of each clock tick, the maximum number of each RTEMS
object that can be created, the application initialization tasks,
+the task scheduling algorithm to be used,
and the device drivers in the application. This information
is placed in data structures that are given to RTEMS at
system initialization time. This chapter details the
@@ -392,6 +393,54 @@ and the user is assumed to provide one or more initialization tasks.
@c
@c
@c
+@subsection Scheduler Algorithm Configuration
+This section defines the configuration parameters related to selecting
+a scheduling algorithm for an application. Regardless of whether
+@code{CONFIGURE_SCHEDULER_POLICY} is defined, if none of the other
+configuration parameters are set, then @code{rtems/confdefs.h} will define
+@code{CONFIGURE_SCHEDULER_PRIORITY} and will (re)define
+@code{CONFIGURE_SCHEDULER_POLICY} as @code{_Scheduler_Priority}. That is,
+@code{CONFIGURE_SCHEDULER_PRIORITY} is the default scheduling algorithm.
+
+@itemize @bullet
+@findex CONFIGURE_SCHEDULER_POLICY
+@item @code{CONFIGURE_SCHEDULER_POLICY} is defined to specify which
+scheduling algorithm an application will use. If it is undefined,
+then @code{rtems/confdefs.h} will define it based on the definition
+of the following configuration parameters.
+Valid values for this configuration parameter are:
+@code{_Scheduler_USER},
+@code{_Scheduler_Priority}.
+
+@findex CONFIGURE_SCHEDULER_USER
+@item @code{CONFIGURE_SCHEDULER_USER} is defined if the application
+provides its own scheduling algorithm. If @code{CONFIGURE_SCHEDULER_USER} is
+defined then @code{CONFIGURE_SCHEDULER_ENTRY_USER} must be defined with the
+name of the application's initialization function. If both
+configuration parameters are defined and @code{CONFIGURE_SCHEDULER_POLICY}
+is undefined, then @code{CONFIGURE_SCHEDULER_POLICY} will be be defined as
+@code{_Scheduler_USER}.
+
+@findex CONFIGURE_SCHEDULER_ALL
+@item @code{CONFIGURE_SCHEDULER_ALL} is defined if the application
+chooses to include all of the RTEMS-provided schedulers.
+@code{CONFIGURE_SCHEDULER_ALL} will define all of the following configuration
+parameters and will use @code{CONFIGURE_SCHEDULER_POLICY} to select the
+algorithm to use. If @code{CONFIGURE_SCHEDULER_POLICY} is not defined, then
+@code{rtems/confdefs.h} will define it as @code{_Scheduler_Priority}.
+
+@findex CONFIGURE_SCHEDULER_PRIORITY
+@item @code{CONFIGURE_SCHEDULER_PRIORITY} is defined if the application
+will use the Priority Scheduling algorithm.
+If none of the previous configuration parameters are defined by the
+application, then @code{rtems/confdefs.h} will define
+@code{CONFIGURE_SCHEDULER_POLICY} as @code{_Scheduler_PRIORITY}.
+
+@end itemize
+
+@c
+@c
+@c
@subsection Device Driver Table
This section defines the configuration parameters related
@@ -816,6 +865,7 @@ typedef struct @{
uint32_t maximum_extensions;
uint32_t microseconds_per_tick;
uint32_t ticks_per_timeslice;
+ uint32_t scheduler_policy;
void (*idle_task)( void );
uint32_t idle_task_stack_size;
uint32_t interrupt_stack_size;
@@ -875,6 +925,12 @@ When using the @code{rtems/confdefs.h} mechanism for configuring
an RTEMS application, the value for this field corresponds
to the setting of the macro @code{CONFIGURE_TICKS_PER_TIMESLICE}.
+@item scheduler_policy
+is the algorithm to use for task scheduling.
+When using the @code{rtems/confdefs.h} mechanism for configuring
+an RTEMS application, the value for this field corresponds
+to the setting of the macro @code{CONFIGURE_SCHEDULER_POLICY}.
+
@item idle_task
is the address of the optional user
provided routine which is used as the system's IDLE task. If
diff --git a/doc/user/schedule.t b/doc/user/schedule.t
index fd4f1148b3..1dc25c5ed8 100644
--- a/doc/user/schedule.t
+++ b/doc/user/schedule.t
@@ -30,7 +30,30 @@ 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 RTEMS scheduler allocates the processor using a
+attention.
+
+@section Scheduling Algorithms
+
+@cindex scheduling algorithms
+
+RTEMS provides multiple possible scheduling algorithms, each
+of which are appropriate to different use case scenarios.
+The classic RTEMS scheduling algorithm -- the only
+algorithm available in RTEMS 4.10 and earlier -- is the priority
+scheduling algorithm. When not specified, the priority scheduling
+algorithm can be assumed.
+
+RTEMS currently supports the following scheduling algorithms:
+
+@itemize @bullet
+@item Priority scheduling
+@end itemize
+
+@subsection Priority Scheduling
+
+@cindex priority scheduling
+
+The RTEMS scheduler allocates the processor using a
priority-based, preemptive algorithm augmented to provide
round-robin characteristics within individual priority groups.
The goal of this algorithm is to guarantee that the task which
@@ -50,6 +73,11 @@ chain is allocated the processor. RTEMS schedules tasks using
the second method to guarantee faster response times to external
events.
+Priority scheduling is the most commonly used scheduling algorithm.
+It should be used by applications in which multiple tasks contend for
+CPU time or other resources and there is a need to ensure certain tasks
+are given priority over other tasks.
+
@section Scheduling Mechanisms
@cindex scheduling mechanisms
@@ -81,6 +109,11 @@ description.
@cindex task priority
+This mechanism affects the following scheduling algorithms:
+@itemize @bullet
+@item Priority scheduling
+@end itemize
+
The most significant of these mechanisms is the
ability for the user to assign a priority level to each
individual task when it is created and to alter a task's
@@ -104,6 +137,11 @@ to a task.}
@cindex preemption
+This mechanism affects the following scheduling algorithms:
+@itemize @bullet
+@item Priority scheduling
+@end itemize
+
Another way the user can alter the basic scheduling
algorithm is by manipulating the preemption mode flag
(@code{@value{RPREFIX}PREEMPT_MASK}) of individual tasks. If preemption is disabled
@@ -120,6 +158,11 @@ control of the processor.
@cindex timeslicing
@cindex round robin scheduling
+This mechanism affects the following scheduling algorithms:
+@itemize @bullet
+@item Priority scheduling
+@end itemize
+
Timeslicing or round-robin scheduling is an
additional method which can be used to alter the basic
scheduling algorithm. Like preemption, timeslicing is specified
@@ -141,6 +184,11 @@ entire timeslice.
@cindex manual round robin
+This mechanism affects the following scheduling algorithms:
+@itemize @bullet
+@item Priority scheduling
+@end itemize
+
The final mechanism for altering the RTEMS scheduling
algorithm is called manual round-robin. Manual round-robin is
invoked by using the @code{@value{DIRPREFIX}task_wake_after}
@@ -151,7 +199,7 @@ end of its priority group. If no other tasks of the same
priority are ready to run, then the task does not lose control
of the processor.
-@subsection Dispatching Tasks
+@section Dispatching Tasks
@cindex dispatching