User`s guide

Schedulers and Timing
Multitasking scheduling also means that overruns, where a task runs beyond
its intended tim e, can occur during execution.
To understand these example, you must be familiar with the following
scheduling concepts:
Preemption is the ability of one t a sk to pause the processing o f a running
task to run instead. With the multitasking scheduler, you can dene a
task as preemptible—thus, another task can pause (preempt) the task
that allows preemption. The scheduler examples in this sectio n that
demonstrate p reemptio n, illustrate one or more tasks allowing preemption.
Overrunning occurs when a task does not reach completion before it is
scheduled to run again. For example, overrunning can occur when a
Base-Rate task does not nish in 1 ms. Overrunning delays the next
execution of the overrunning task and may delay execution of other tasks.
Examples in this section demonstrate a variety of multitasking congurations:
“Three Odd-Rate Tasks Without Preemption and Overruns” on page 3-27
“Two Tasks with the Base-Rate Task Overrunning, No Preemption” on
page 3-28
“Two Tasks with Sub-Rate 1 Overrunning Without Preemption” on page
3-30
“Three Even-Rate Tasks with Preemption and No Overruns” o n page 3-31
“Three Odd-Rate Tasks Without Preemption and the Base and Sub-Rate1
Tasks Overrun” on page 3-33
“Three Odd-Rate Tasks with Preemption and Sub-Rate 1 Task O verruns”
on page 3-35
“Three Even-Rate Tasks w ith Preemption and the B ase-R ate and Sub-Rate
1 Tasks Overrun” on page 3-37
Each example presents either two or three tasks:
Base Rate task . Baserateisthehighestrateinthemodelorapplication.
The examples use a base rate of 1ms so that the task should execute every
one millisecond.
3-25