Changeset a23b1fb in rtems-docs for c-user/scheduling_concepts.rst


Ignore:
Timestamp:
May 14, 2020, 12:50:02 PM (3 months ago)
Author:
Richi Dubey <richidubey@…>
Branches:
5, master
Children:
59312aa
Parents:
d4ba908
git-author:
Richi Dubey <richidubey@…> (05/14/20 12:50:02)
git-committer:
Joel Sherrill <joel@…> (05/17/20 21:48:25)
Message:

Spelling/Grammar? Mistakes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c-user/scheduling_concepts.rst

    rd4ba908 ra23b1fb  
    1717
    1818The concept of scheduling in real-time systems dictates the ability to provide
    19 immediate response to specific external events, particularly the necessity of
     19an immediate response to specific external events, particularly the necessity of
    2020scheduling tasks to run within a specified time limit after the occurrence of
    2121an event.  For example, software embedded in life-support systems used to
     
    3939
    4040- rtems_scheduler_map_priority_to_posix_ - Map task priority to POSIX thread
    41   prority
     41  priority
    4242
    4343- rtems_scheduler_map_priority_from_posix_ - Map POSIX thread priority to task
     
    5959---------------------
    6060
    61 RTEMS provides a plugin framework which allows it to support multiple
    62 scheduling algorithms. RTEMS includes multiple scheduling algorithms and the
     61RTEMS provides a plugin framework that allows it to support multiple
     62scheduling algorithms. RTEMS includes multiple scheduling algorithms, and the
    6363user can select which of these they wish to use in their application at
    6464link-time.  In addition, the user can implement their own scheduling algorithm
     
    7070possibly with preemption control.  The classic RTEMS scheduling algorithm which
    7171was the only algorithm available in RTEMS 4.10 and earlier, is a fixed-priority
    72 scheduling algorithm.  This scheduling algoritm is suitable for uniprocessor
    73 (e.g. non-SMP) systems and is known as the *Deterministic Priority
     72scheduling algorithm.  This scheduling algorithm is suitable for uniprocessor
     73(e.g., non-SMP) systems and is known as the *Deterministic Priority
    7474Scheduler*.  Unless the user configures another scheduling algorithm, RTEMS
    7575will use this on uniprocessor systems.
     
    8888
    8989When a task is added to the ready chain, it is placed behind all other tasks of
    90 the same priority.  This rule provides a round-robin within priority group
     90the same priority.  This rule provides a round-robin within a priority group
    9191scheduling characteristic.  This means that in a group of equal priority tasks,
    9292tasks will execute in the order they become ready or FIFO order.  Even though
     
    101101Priority scheduling is the most commonly used scheduling algorithm.  It should
    102102be used by applications in which multiple tasks contend for CPU time or other
    103 resources and there is a need to ensure certain tasks are given priority over
     103resources, and there is a need to ensure certain tasks are given priority over
    104104other tasks.
    105105
     
    128128
    129129RTEMS currently includes multiple priority based scheduling algorithms as well
    130 as other algorithms which incorporate deadline.  Each algorithm is discussed in
     130as other algorithms that incorporate deadline.  Each algorithm is discussed in
    131131the following sections.
    132132
     
    143143
    144144This is the scheduler implementation which has always been in RTEMS.  After the
    145 4.10 release series, it was factored into pluggable scheduler selection.  It
     1454.10 release series, it was factored into a pluggable scheduler selection.  It
    146146schedules tasks using a priority based algorithm which takes into account
    147147preemption.  It is implemented using an array of FIFOs with a FIFO per
     
    149149ready tasks.
    150150
    151 This algorithm is deterministic (e.g. predictable and fixed) in execution time.
     151This algorithm is deterministic (e.g., predictable and fixed) in execution time.
    152152This comes at the cost of using slightly over three (3) kilobytes of RAM on a
    153153system configured to support 256 priority levels.
     
    168168is *O(n)* where *n* is the number of ready tasks.  In a small system with a
    169169small number of tasks, this will not be a performance issue.  Reducing RAM
    170 consumption is often critical in small systems which are incapable of
     170consumption is often critical in small systems that are incapable of
    171171supporting a large number of tasks.
    172172
     
    180180---------------------------------
    181181
    182 This is an alternative scheduler in RTEMS for single core applications.  The
     182This is an alternative scheduler in RTEMS for single-core applications.  The
    183183primary EDF advantage is high total CPU utilization (theoretically up to
    184184100%). It assumes that tasks have priorities equal to deadlines.
    185185
    186186This EDF is initially preemptive, however, individual tasks may be declared
    187 not-preemptive. Deadlines are declared using only Rate Monotonic manager which
    188 goal is to handle periodic behavior. Period is always equal to deadline. All
     187not-preemptive. Deadlines are declared using only Rate Monotonic manager whose
     188goal is to handle periodic behavior. Period is always equal to the deadline. All
    189189ready tasks reside in a single ready queue implemented using a red-black tree.
    190190
     
    192192while each task may switch between the two types within its execution. If a
    193193task does have a deadline declared using the Rate Monotonic manager, the task
    194 is deadline-driven and its priority is equal to deadline.  On the contrary if a
     194is deadline-driven and its priority is equal to deadline.  On the contrary, if a
    195195task does not have any deadline or the deadline is cancelled using the Rate
    196196Monotonic manager, the task is considered a background task with priority equal
    197197to that assigned upon initialization in the same manner as for priority
    198 scheduler. Each background task is of a lower importance than each
     198scheduler. Each background task is of lower importance than each
    199199deadline-driven one and is scheduled when no deadline-driven task and no higher
    200200priority background task is ready to run.
     
    204204execution. In RTEMS periods are equal to deadlines, thus if a task announces a
    205205period, it has to be finished until the end of this period. The call of
    206 ``rtems_rate_monotonic_period`` passes the scheduler the length of oncoming
     206``rtems_rate_monotonic_period`` passes the scheduler the length of an oncoming
    207207deadline. Moreover, the ``rtems_rate_monotonic_cancel`` and
    208208``rtems_rate_monotonic_delete`` calls clear the deadlines assigned to the task.
     
    215215------------------------------------------
    216216
    217 This is an alternative scheduler in RTEMS for single core applications.  The
     217This is an alternative scheduler in RTEMS for single-core applications.  The
    218218CBS is a budget aware extension of EDF scheduler. The main goal of this
    219219scheduler is to ensure temporal isolation of tasks meaning that a task's
     
    259259an active deadline have a higher priority than the background tasks.  This
    260260scheduler supports :ref:`task processor affinities <rtems_task_set_affinity>`
    261 of one-to-one and one-to-all, e.g.  a task can execute on exactly one processor
     261of one-to-one and one-to-all, e.g.,  a task can execute on exactly one processor
    262262or all processors managed by the scheduler instance.  The processor affinity
    263263set of a task must contain all online processors to select the one-to-all
     
    432432task.
    433433
    434 When a task is created via the ``rtems_task_create`` directive it enters the
     434When a task is created via the ``rtems_task_create`` directive, it enters the
    435435dormant state.  This state is not entered through any other means.  Although
    436436the task exists in the system, it cannot actively compete for system resources.
     
    458458
    459459- The running task issues a ``rtems_message_queue_receive`` directive with the
    460   wait option and the message queue is empty.
    461 
    462 - The running task issues an ``rtems_event_receive`` directive with the wait
    463   option and the currently pending events do not satisfy the request.
     460  wait option, and the message queue is empty.
     461
     462- The running task issues a ``rtems_event_receive`` directive with the wait
     463  option, and the currently pending events do not satisfy the request.
    464464
    465465- The running task issues a ``rtems_semaphore_obtain`` directive with the wait
     
    499499
    500500- A running task issues an ``rtems_event_send`` directive which sends an event
    501   condition to a task which is blocked waiting on that event condition.
     501  condition to a task that is blocked waiting on that event condition.
    502502
    503503- A running task issues a ``rtems_semaphore_release`` directive which releases
Note: See TracChangeset for help on using the changeset viewer.