1 | @c |
---|
2 | @c COPYRIGHT (c) 1988-2013. |
---|
3 | @c On-Line Applications Research Corporation (OAR). |
---|
4 | @c All rights reserved. |
---|
5 | |
---|
6 | @c |
---|
7 | @c Open Issues |
---|
8 | @c - nicen up the tables |
---|
9 | @c - use math mode to print formulas |
---|
10 | @c |
---|
11 | |
---|
12 | @chapter Rate Monotonic Manager |
---|
13 | |
---|
14 | @cindex rate mononitonic tasks |
---|
15 | @cindex periodic tasks |
---|
16 | |
---|
17 | @section Introduction |
---|
18 | |
---|
19 | The rate monotonic manager provides facilities to implement tasks which execute |
---|
20 | in a periodic fashion. Critically, it also gathers information about the |
---|
21 | execution of those periods and can provide important statistics to the |
---|
22 | user which can be used to analyze and tune the application. The directives |
---|
23 | provided by the rate monotonic manager are: |
---|
24 | |
---|
25 | @itemize @bullet |
---|
26 | @item @code{@value{DIRPREFIX}rate_monotonic_create} - Create a rate monotonic period |
---|
27 | @item @code{@value{DIRPREFIX}rate_monotonic_ident} - Get ID of a period |
---|
28 | @item @code{@value{DIRPREFIX}rate_monotonic_cancel} - Cancel a period |
---|
29 | @item @code{@value{DIRPREFIX}rate_monotonic_delete} - Delete a rate monotonic period |
---|
30 | @item @code{@value{DIRPREFIX}rate_monotonic_period} - Conclude current/Start next period |
---|
31 | @item @code{@value{DIRPREFIX}rate_monotonic_get_status} - Obtain status from a period |
---|
32 | @item @code{@value{DIRPREFIX}rate_monotonic_get_statistics} - Obtain statistics from a period |
---|
33 | @item @code{@value{DIRPREFIX}rate_monotonic_reset_statistics} - Reset statistics for a period |
---|
34 | @item @code{@value{DIRPREFIX}rate_monotonic_reset_all_statistics} - Reset statistics for all periods |
---|
35 | @item @code{@value{DIRPREFIX}rate_monotonic_report_statistics} - Print period statistics report |
---|
36 | @end itemize |
---|
37 | |
---|
38 | @section Background |
---|
39 | |
---|
40 | The rate monotonic manager provides facilities to |
---|
41 | manage the execution of periodic tasks. This manager was |
---|
42 | designed to support application designers who utilize the Rate |
---|
43 | Monotonic Scheduling Algorithm (RMS) to ensure that their |
---|
44 | periodic tasks will meet their deadlines, even under transient |
---|
45 | overload conditions. Although designed for hard real-time |
---|
46 | systems, the services provided by the rate monotonic manager may |
---|
47 | be used by any application which requires periodic tasks. |
---|
48 | |
---|
49 | @subsection Rate Monotonic Manager Required Support |
---|
50 | |
---|
51 | A clock tick is required to support the functionality provided by this manager. |
---|
52 | |
---|
53 | @subsection Period Statistics |
---|
54 | |
---|
55 | This manager maintains a set of statistics on each period object. These |
---|
56 | statistics are reset implictly at period creation time and may be reset or |
---|
57 | obtained at any time by the application. The following is a list of the |
---|
58 | information kept: |
---|
59 | |
---|
60 | @itemize @bullet |
---|
61 | @item @code{owner} |
---|
62 | is the id of the thread that owns this period. |
---|
63 | |
---|
64 | @item @code{count} |
---|
65 | is the total number of periods executed. |
---|
66 | |
---|
67 | @item @code{missed_count} |
---|
68 | is the number of periods that were missed. |
---|
69 | |
---|
70 | @item @code{min_cpu_time} |
---|
71 | is the minimum amount of CPU execution time consumed |
---|
72 | on any execution of the periodic loop. |
---|
73 | |
---|
74 | @item @code{max_cpu_time} |
---|
75 | is the maximum amount of CPU execution time consumed |
---|
76 | on any execution of the periodic loop. |
---|
77 | |
---|
78 | @item @code{total_cpu_time} |
---|
79 | is the total amount of CPU execution time consumed |
---|
80 | by executions of the periodic loop. |
---|
81 | |
---|
82 | @item @code{min_wall_time} |
---|
83 | is the minimum amount of wall time that passed |
---|
84 | on any execution of the periodic loop. |
---|
85 | |
---|
86 | @item @code{max_wall_time} |
---|
87 | is the maximum amount of wall time that passed |
---|
88 | on any execution of the periodic loop. |
---|
89 | |
---|
90 | @item @code{total_wall_time} |
---|
91 | is the total amount of wall time that passed |
---|
92 | during executions of the periodic loop. |
---|
93 | |
---|
94 | @end itemize |
---|
95 | |
---|
96 | Each period is divided into two consecutive phases. The period starts with the |
---|
97 | active phase of the task and is followed by the inactive phase of the task. In |
---|
98 | the inactive phase the task is blocked and waits for the start of the next |
---|
99 | period. The inactive phase is skipped in case of a period miss. The wall time |
---|
100 | includes the time during the active phase of the task on which the task is not |
---|
101 | executing on a processor. The task is either blocked (for example it waits for |
---|
102 | a resource) or a higher priority tasks executes, thus preventing it from |
---|
103 | executing. In case the wall time exceeds the period time, then this is a |
---|
104 | period miss. The gap between the wall time and the period time is the margin |
---|
105 | between a period miss or success. |
---|
106 | |
---|
107 | The period statistics information is inexpensive to maintain |
---|
108 | and can provide very useful insights into the execution |
---|
109 | characteristics of a periodic task loop. But it is just information. |
---|
110 | The period statistics reported must be analyzed by the user in terms |
---|
111 | of what the applications is. For example, in an application where |
---|
112 | priorities are assigned by the Rate Monotonic Algorithm, it would |
---|
113 | be very undesirable for high priority (i.e. frequency) tasks to |
---|
114 | miss their period. Similarly, in nearly any application, if a |
---|
115 | task were supposed to execute its periodic loop every 10 milliseconds |
---|
116 | and it averaged 11 milliseconds, then application requirements |
---|
117 | are not being met. |
---|
118 | |
---|
119 | The information reported can be used to determine the "hot spots" |
---|
120 | in the application. Given a period's id, the user can determine |
---|
121 | the length of that period. From that information and the CPU usage, |
---|
122 | the user can calculate the percentage of CPU time consumed by that |
---|
123 | periodic task. For example, a task executing for 20 milliseconds |
---|
124 | every 200 milliseconds is consuming 10 percent of the processor's |
---|
125 | execution time. This is usually enough to make it a good candidate |
---|
126 | for optimization. |
---|
127 | |
---|
128 | However, execution time alone is not enough to gauge the value of |
---|
129 | optimizing a particular task. It is more important to optimize |
---|
130 | a task executing 2 millisecond every 10 milliseconds (20 percent |
---|
131 | of the CPU) than one executing 10 milliseconds every 100 (10 percent |
---|
132 | of the CPU). As a general rule of thumb, the higher frequency at |
---|
133 | which a task executes, the more important it is to optimize that |
---|
134 | task. |
---|
135 | |
---|
136 | @subsection Rate Monotonic Manager Definitions |
---|
137 | |
---|
138 | @cindex periodic task, definition |
---|
139 | |
---|
140 | A periodic task is one which must be executed at a |
---|
141 | regular interval. The interval between successive iterations of |
---|
142 | the task is referred to as its period. Periodic tasks can be |
---|
143 | characterized by the length of their period and execution time. |
---|
144 | The period and execution time of a task can be used to determine |
---|
145 | the processor utilization for that task. Processor utilization |
---|
146 | is the percentage of processor time used and can be calculated |
---|
147 | on a per-task or system-wide basis. Typically, the task's |
---|
148 | worst-case execution time will be less than its period. For |
---|
149 | example, a periodic task's requirements may state that it should |
---|
150 | execute for 10 milliseconds every 100 milliseconds. Although |
---|
151 | the execution time may be the average, worst, or best case, the |
---|
152 | worst-case execution time is more appropriate for use when |
---|
153 | analyzing system behavior under transient overload conditions. |
---|
154 | |
---|
155 | @cindex aperiodic task, definition |
---|
156 | |
---|
157 | In contrast, an aperiodic task executes at irregular |
---|
158 | intervals and has only a soft deadline. In other words, the |
---|
159 | deadlines for aperiodic tasks are not rigid, but adequate |
---|
160 | response times are desirable. For example, an aperiodic task |
---|
161 | may process user input from a terminal. |
---|
162 | |
---|
163 | @cindex sporadic task, definition |
---|
164 | |
---|
165 | Finally, a sporadic task is an aperiodic task with a |
---|
166 | hard deadline and minimum interarrival time. The minimum |
---|
167 | interarrival time is the minimum period of time which exists |
---|
168 | between successive iterations of the task. For example, a |
---|
169 | sporadic task could be used to process the pressing of a fire |
---|
170 | button on a joystick. The mechanical action of the fire button |
---|
171 | ensures a minimum time period between successive activations, |
---|
172 | but the missile must be launched by a hard deadline. |
---|
173 | |
---|
174 | @subsection Rate Monotonic Scheduling Algorithm |
---|
175 | |
---|
176 | @cindex Rate Monotonic Scheduling Algorithm, definition |
---|
177 | @cindex RMS Algorithm, definition |
---|
178 | |
---|
179 | The Rate Monotonic Scheduling Algorithm (RMS) is |
---|
180 | important to real-time systems designers because it allows one |
---|
181 | to guarantee that a set of tasks is schedulable. A set of tasks |
---|
182 | is said to be schedulable if all of the tasks can meet their |
---|
183 | deadlines. RMS provides a set of rules which can be used to |
---|
184 | perform a guaranteed schedulability analysis for a task set. |
---|
185 | This analysis determines whether a task set is schedulable under |
---|
186 | worst-case conditions and emphasizes the predictability of the |
---|
187 | system's behavior. It has been proven that: |
---|
188 | |
---|
189 | @itemize @code{ } |
---|
190 | @item @b{RMS is an optimal static priority algorithm for |
---|
191 | scheduling independent, preemptible, periodic tasks |
---|
192 | on a single processor.} |
---|
193 | @end itemize |
---|
194 | |
---|
195 | RMS is optimal in the sense that if a set of tasks |
---|
196 | can be scheduled by any static priority algorithm, then RMS will |
---|
197 | be able to schedule that task set. RMS bases it schedulability |
---|
198 | analysis on the processor utilization level below which all |
---|
199 | deadlines can be met. |
---|
200 | |
---|
201 | RMS calls for the static assignment of task |
---|
202 | priorities based upon their period. The shorter a task's |
---|
203 | period, the higher its priority. For example, a task with a 1 |
---|
204 | millisecond period has higher priority than a task with a 100 |
---|
205 | millisecond period. If two tasks have the same period, then RMS |
---|
206 | does not distinguish between the tasks. However, RTEMS |
---|
207 | specifies that when given tasks of equal priority, the task |
---|
208 | which has been ready longest will execute first. RMS's priority |
---|
209 | assignment scheme does not provide one with exact numeric values |
---|
210 | for task priorities. For example, consider the following task |
---|
211 | set and priority assignments: |
---|
212 | |
---|
213 | @ifset use-ascii |
---|
214 | @example |
---|
215 | @group |
---|
216 | +--------------------+---------------------+---------------------+ |
---|
217 | | Task | Period | Priority | |
---|
218 | | | (in milliseconds) | | |
---|
219 | +--------------------+---------------------+---------------------+ |
---|
220 | | 1 | 100 | Low | |
---|
221 | +--------------------+---------------------+---------------------+ |
---|
222 | | 2 | 50 | Medium | |
---|
223 | +--------------------+---------------------+---------------------+ |
---|
224 | | 3 | 50 | Medium | |
---|
225 | +--------------------+---------------------+---------------------+ |
---|
226 | | 4 | 25 | High | |
---|
227 | +--------------------+---------------------+---------------------+ |
---|
228 | @end group |
---|
229 | @end example |
---|
230 | @end ifset |
---|
231 | |
---|
232 | @ifset use-tex |
---|
233 | @sp 1 |
---|
234 | @tex |
---|
235 | \centerline{\vbox{\offinterlineskip\halign{ |
---|
236 | \vrule\strut#& |
---|
237 | \hbox to 0.75in{\enskip\hfil#\hfil}& |
---|
238 | \vrule#& |
---|
239 | \hbox to 1.25in{\enskip\hfil#\hfil}& |
---|
240 | \vrule#& |
---|
241 | \hbox to 1.25in{\enskip\hfil#\hfil}& |
---|
242 | \vrule#\cr\noalign{\hrule} |
---|
243 | &\bf Task&& \bf Period && \bf Priority &\cr |
---|
244 | & && \bf (in milliseconds) && &\cr\noalign{\hrule} |
---|
245 | & 1 && 100 && Low &\cr\noalign{\hrule} |
---|
246 | & 2 && 50 && Medium &\cr\noalign{\hrule} |
---|
247 | & 3 && 50 && Medium &\cr\noalign{\hrule} |
---|
248 | & 4 && 25 && High &\cr\noalign{\hrule} |
---|
249 | }}\hfil} |
---|
250 | @end tex |
---|
251 | @end ifset |
---|
252 | |
---|
253 | @ifset use-html |
---|
254 | @html |
---|
255 | <CENTER> |
---|
256 | <TABLE COLS=3 WIDTH="80%" BORDER=2> |
---|
257 | <TR><TD ALIGN=center><STRONG>Task</STRONG></TD> |
---|
258 | <TD ALIGN=center><STRONG>Period (in milliseconds)</STRONG></TD> |
---|
259 | <TD ALIGN=center><STRONG>Priority</STRONG></TD></TR> |
---|
260 | <TR><TD ALIGN=center>1</TD> |
---|
261 | <TD ALIGN=center>100 </TD> |
---|
262 | <TD ALIGN=center>Low</TD></TR> |
---|
263 | <TR><TD ALIGN=center>2</TD> |
---|
264 | <TD ALIGN=center>50 </TD> |
---|
265 | <TD ALIGN=center>Medium</TD></TR> |
---|
266 | <TR><TD ALIGN=center>3</TD> |
---|
267 | <TD ALIGN=center>50 </TD> |
---|
268 | <TD ALIGN=center>Medium</TD></TR> |
---|
269 | <TR><TD ALIGN=center>4</TD> |
---|
270 | <TD ALIGN=center>25 </TD> |
---|
271 | <TD ALIGN=center>High</TD></TR> |
---|
272 | </TABLE> |
---|
273 | </CENTER> |
---|
274 | @end html |
---|
275 | @end ifset |
---|
276 | |
---|
277 | RMS only calls for task 1 to have the lowest |
---|
278 | priority, task 4 to have the highest priority, and tasks 2 and 3 |
---|
279 | to have an equal priority between that of tasks 1 and 4. The |
---|
280 | actual RTEMS priorities assigned to the tasks must only adhere |
---|
281 | to those guidelines. |
---|
282 | |
---|
283 | Many applications have tasks with both hard and soft |
---|
284 | deadlines. The tasks with hard deadlines are typically referred |
---|
285 | to as the critical task set, with the soft deadline tasks being |
---|
286 | the non-critical task set. The critical task set can be |
---|
287 | scheduled using RMS, with the non-critical tasks not executing |
---|
288 | under transient overload, by simply assigning priorities such |
---|
289 | that the lowest priority critical task (i.e. longest period) has |
---|
290 | a higher priority than the highest priority non-critical task. |
---|
291 | Although RMS may be used to assign priorities to the |
---|
292 | non-critical tasks, it is not necessary. In this instance, |
---|
293 | schedulability is only guaranteed for the critical task set. |
---|
294 | |
---|
295 | @subsection Schedulability Analysis |
---|
296 | |
---|
297 | @cindex RMS schedulability analysis |
---|
298 | |
---|
299 | RMS allows application designers to ensure that tasks |
---|
300 | can meet all deadlines, even under transient overload, without |
---|
301 | knowing exactly when any given task will execute by applying |
---|
302 | proven schedulability analysis rules. |
---|
303 | |
---|
304 | @subsubsection Assumptions |
---|
305 | |
---|
306 | The schedulability analysis rules for RMS were |
---|
307 | developed based on the following assumptions: |
---|
308 | |
---|
309 | |
---|
310 | @itemize @bullet |
---|
311 | @item The requests for all tasks for which hard deadlines |
---|
312 | exist are periodic, with a constant interval between requests. |
---|
313 | |
---|
314 | @item Each task must complete before the next request for it |
---|
315 | occurs. |
---|
316 | |
---|
317 | @item The tasks are independent in that a task does not depend |
---|
318 | on the initiation or completion of requests for other tasks. |
---|
319 | |
---|
320 | @item The execution time for each task without preemption or |
---|
321 | interruption is constant and does not vary. |
---|
322 | |
---|
323 | @item Any non-periodic tasks in the system are special. These |
---|
324 | tasks displace periodic tasks while executing and do not have |
---|
325 | hard, critical deadlines. |
---|
326 | @end itemize |
---|
327 | |
---|
328 | Once the basic schedulability analysis is understood, |
---|
329 | some of the above assumptions can be relaxed and the |
---|
330 | side-effects accounted for. |
---|
331 | |
---|
332 | @subsubsection Processor Utilization Rule |
---|
333 | |
---|
334 | @cindex RMS Processor Utilization Rule |
---|
335 | |
---|
336 | The Processor Utilization Rule requires that |
---|
337 | processor utilization be calculated based upon the period and |
---|
338 | execution time of each task. The fraction of processor time |
---|
339 | spent executing task index is Time(index) / Period(index). The |
---|
340 | processor utilization can be calculated as follows: |
---|
341 | |
---|
342 | @example |
---|
343 | @group |
---|
344 | Utilization = 0 |
---|
345 | |
---|
346 | for index = 1 to maximum_tasks |
---|
347 | Utilization = Utilization + (Time(index)/Period(index)) |
---|
348 | @end group |
---|
349 | @end example |
---|
350 | |
---|
351 | To ensure schedulability even under transient |
---|
352 | overload, the processor utilization must adhere to the following |
---|
353 | rule: |
---|
354 | |
---|
355 | @example |
---|
356 | Utilization = maximum_tasks * (2**(1/maximum_tasks) - 1) |
---|
357 | @end example |
---|
358 | |
---|
359 | As the number of tasks increases, the above formula |
---|
360 | approaches ln(2) for a worst-case utilization factor of |
---|
361 | approximately 0.693. Many tasks sets can be scheduled with a |
---|
362 | greater utilization factor. In fact, the average processor |
---|
363 | utilization threshold for a randomly generated task set is |
---|
364 | approximately 0.88. |
---|
365 | |
---|
366 | @subsubsection Processor Utilization Rule Example |
---|
367 | |
---|
368 | This example illustrates the application of the |
---|
369 | Processor Utilization Rule to an application with three critical |
---|
370 | periodic tasks. The following table details the RMS priority, |
---|
371 | period, execution time, and processor utilization for each task: |
---|
372 | |
---|
373 | @ifset use-ascii |
---|
374 | @example |
---|
375 | @group |
---|
376 | +------------+----------+--------+-----------+-------------+ |
---|
377 | | Task | RMS | Period | Execution | Processor | |
---|
378 | | | Priority | | Time | Utilization | |
---|
379 | +------------+----------+--------+-----------+-------------+ |
---|
380 | | 1 | High | 100 | 15 | 0.15 | |
---|
381 | +------------+----------+--------+-----------+-------------+ |
---|
382 | | 2 | Medium | 200 | 50 | 0.25 | |
---|
383 | +------------+----------+--------+-----------+-------------+ |
---|
384 | | 3 | Low | 300 | 100 | 0.33 | |
---|
385 | +------------+----------+--------+-----------+-------------+ |
---|
386 | @end group |
---|
387 | @end example |
---|
388 | @end ifset |
---|
389 | |
---|
390 | @ifset use-tex |
---|
391 | @sp 1 |
---|
392 | @tex |
---|
393 | \centerline{\vbox{\offinterlineskip\halign{ |
---|
394 | \vrule\strut#& |
---|
395 | \hbox to 0.75in{\enskip\hfil#\hfil}& |
---|
396 | \vrule#& |
---|
397 | \hbox to 0.75in{\enskip\hfil#\hfil}& |
---|
398 | \vrule#& |
---|
399 | \hbox to 0.75in{\enskip\hfil#\hfil}& |
---|
400 | \vrule#& |
---|
401 | \hbox to 1.00in{\enskip\hfil#\hfil}& |
---|
402 | \vrule#& |
---|
403 | \hbox to 1.00in{\enskip\hfil#\hfil}& |
---|
404 | \vrule#\cr\noalign{\hrule} |
---|
405 | &\bf Task&& \bf RMS && \bf Period && \bf Execution &&\bf Processor&\cr |
---|
406 | & && \bf Priority && &&\bf Time &&\bf Utilization &\cr\noalign{\hrule} |
---|
407 | & 1 && High && 100 && 15 && 0.15 &\cr\noalign{\hrule} |
---|
408 | & 2 && Medium && 200 && 50 && 0.25 &\cr\noalign{\hrule} |
---|
409 | & 3 && Low && 300 && 100 && 0.33 &\cr\noalign{\hrule} |
---|
410 | }}\hfil} |
---|
411 | @end tex |
---|
412 | @end ifset |
---|
413 | |
---|
414 | @ifset use-html |
---|
415 | @html |
---|
416 | <CENTER> |
---|
417 | <TABLE COLS=5 WIDTH="80%" BORDER=2> |
---|
418 | <TR><TD ALIGN=center><STRONG>Task</STRONG></TD> |
---|
419 | <TD ALIGN=center><STRONG>RMS Priority</STRONG></TD> |
---|
420 | <TD ALIGN=center><STRONG>Period</STRONG></TD> |
---|
421 | <TD ALIGN=center><STRONG>Execution Time</STRONG></TD> |
---|
422 | <TD ALIGN=center><STRONG>Processor Utilization</STRONG></TD></TR> |
---|
423 | <TR><TD ALIGN=center>1</TD> |
---|
424 | <TD ALIGN=center>High</TD> |
---|
425 | <TD ALIGN=center>100</TD> |
---|
426 | <TD ALIGN=center>15</TD> |
---|
427 | <TD ALIGN=center>0.15</TD></TR> |
---|
428 | <TR><TD ALIGN=center>2</TD> |
---|
429 | <TD ALIGN=center>Medium</TD> |
---|
430 | <TD ALIGN=center>200</TD> |
---|
431 | <TD ALIGN=center>50</TD> |
---|
432 | <TD ALIGN=center>0.25</TD></TR> |
---|
433 | <TR><TD ALIGN=center>3</TD> |
---|
434 | <TD ALIGN=center>Low</TD> |
---|
435 | <TD ALIGN=center>300</TD> |
---|
436 | <TD ALIGN=center>100</TD> |
---|
437 | <TD ALIGN=center>0.33</TD></TR> |
---|
438 | </TABLE> |
---|
439 | </CENTER> |
---|
440 | @end html |
---|
441 | @end ifset |
---|
442 | |
---|
443 | The total processor utilization for this task set is |
---|
444 | 0.73 which is below the upper bound of 3 * (2**(1/3) - 1), or |
---|
445 | 0.779, imposed by the Processor Utilization Rule. Therefore, |
---|
446 | this task set is guaranteed to be schedulable using RMS. |
---|
447 | |
---|
448 | @subsubsection First Deadline Rule |
---|
449 | |
---|
450 | @cindex RMS First Deadline Rule |
---|
451 | |
---|
452 | If a given set of tasks do exceed the processor |
---|
453 | utilization upper limit imposed by the Processor Utilization |
---|
454 | Rule, they can still be guaranteed to meet all their deadlines |
---|
455 | by application of the First Deadline Rule. This rule can be |
---|
456 | stated as follows: |
---|
457 | |
---|
458 | For a given set of independent periodic tasks, if |
---|
459 | each task meets its first deadline when all tasks are started at |
---|
460 | the same time, then the deadlines will always be met for any |
---|
461 | combination of start times. |
---|
462 | |
---|
463 | A key point with this rule is that ALL periodic tasks |
---|
464 | are assumed to start at the exact same instant in time. |
---|
465 | Although this assumption may seem to be invalid, RTEMS makes it |
---|
466 | quite easy to ensure. By having a non-preemptible user |
---|
467 | initialization task, all application tasks, regardless of |
---|
468 | priority, can be created and started before the initialization |
---|
469 | deletes itself. This technique ensures that all tasks begin to |
---|
470 | compete for execution time at the same instant -- when the user |
---|
471 | initialization task deletes itself. |
---|
472 | |
---|
473 | @subsubsection First Deadline Rule Example |
---|
474 | |
---|
475 | The First Deadline Rule can ensure schedulability |
---|
476 | even when the Processor Utilization Rule fails. The example |
---|
477 | below is a modification of the Processor Utilization Rule |
---|
478 | example where task execution time has been increased from 15 to |
---|
479 | 25 units. The following table details the RMS priority, period, |
---|
480 | execution time, and processor utilization for each task: |
---|
481 | |
---|
482 | @ifset use-ascii |
---|
483 | @example |
---|
484 | @group |
---|
485 | +------------+----------+--------+-----------+-------------+ |
---|
486 | | Task | RMS | Period | Execution | Processor | |
---|
487 | | | Priority | | Time | Utilization | |
---|
488 | +------------+----------+--------+-----------+-------------+ |
---|
489 | | 1 | High | 100 | 25 | 0.25 | |
---|
490 | +------------+----------+--------+-----------+-------------+ |
---|
491 | | 2 | Medium | 200 | 50 | 0.25 | |
---|
492 | +------------+----------+--------+-----------+-------------+ |
---|
493 | | 3 | Low | 300 | 100 | 0.33 | |
---|
494 | +------------+----------+--------+-----------+-------------+ |
---|
495 | @end group |
---|
496 | @end example |
---|
497 | @end ifset |
---|
498 | |
---|
499 | @ifset use-tex |
---|
500 | @sp 1 |
---|
501 | @tex |
---|
502 | \centerline{\vbox{\offinterlineskip\halign{ |
---|
503 | \vrule\strut#& |
---|
504 | \hbox to 0.75in{\enskip\hfil#\hfil}& |
---|
505 | \vrule#& |
---|
506 | \hbox to 0.75in{\enskip\hfil#\hfil}& |
---|
507 | \vrule#& |
---|
508 | \hbox to 0.75in{\enskip\hfil#\hfil}& |
---|
509 | \vrule#& |
---|
510 | \hbox to 1.00in{\enskip\hfil#\hfil}& |
---|
511 | \vrule#& |
---|
512 | \hbox to 1.00in{\enskip\hfil#\hfil}& |
---|
513 | \vrule#\cr\noalign{\hrule} |
---|
514 | &\bf Task&& \bf RMS && \bf Period && \bf Execution &&\bf Processor&\cr |
---|
515 | & && \bf Priority && &&\bf Time &&\bf Utilization &\cr\noalign{\hrule} |
---|
516 | & 1 && High && 100 && 25 && 0.25 &\cr\noalign{\hrule} |
---|
517 | & 2 && Medium && 200 && 50 && 0.25 &\cr\noalign{\hrule} |
---|
518 | & 3 && Low && 300 && 100 && 0.33 &\cr\noalign{\hrule} |
---|
519 | }}\hfil} |
---|
520 | @end tex |
---|
521 | @end ifset |
---|
522 | |
---|
523 | @ifset use-html |
---|
524 | @html |
---|
525 | <CENTER> |
---|
526 | <TABLE COLS=5 WIDTH="80%" BORDER=2> |
---|
527 | <TR><TD ALIGN=center><STRONG>Task</STRONG></TD> |
---|
528 | <TD ALIGN=center><STRONG>RMS Priority</STRONG></TD> |
---|
529 | <TD ALIGN=center><STRONG>Period</STRONG></TD> |
---|
530 | <TD ALIGN=center><STRONG>Execution Time</STRONG></TD> |
---|
531 | <TD ALIGN=center><STRONG>Processor Utilization</STRONG></TD></TR> |
---|
532 | <TR><TD ALIGN=center>1</TD> |
---|
533 | <TD ALIGN=center>High</TD> |
---|
534 | <TD ALIGN=center>100</TD> |
---|
535 | <TD ALIGN=center>25</TD> |
---|
536 | <TD ALIGN=center>0.25</TD></TR> |
---|
537 | <TR><TD ALIGN=center>2</TD> |
---|
538 | <TD ALIGN=center>Medium</TD> |
---|
539 | <TD ALIGN=center>200</TD> |
---|
540 | <TD ALIGN=center>50</TD> |
---|
541 | <TD ALIGN=center>0.25</TD></TR> |
---|
542 | <TR><TD ALIGN=center>3</TD> |
---|
543 | <TD ALIGN=center>Low</TD> |
---|
544 | <TD ALIGN=center>300</TD> |
---|
545 | <TD ALIGN=center>100</TD> |
---|
546 | <TD ALIGN=center>0.33</TD></TR> |
---|
547 | </TABLE> |
---|
548 | </CENTER> |
---|
549 | @end html |
---|
550 | @end ifset |
---|
551 | |
---|
552 | The total processor utilization for the modified task |
---|
553 | set is 0.83 which is above the upper bound of 3 * (2**(1/3) - 1), |
---|
554 | or 0.779, imposed by the Processor Utilization Rule. Therefore, |
---|
555 | this task set is not guaranteed to be schedulable using RMS. |
---|
556 | However, the First Deadline Rule can guarantee the |
---|
557 | schedulability of this task set. This rule calls for one to |
---|
558 | examine each occurrence of deadline until either all tasks have |
---|
559 | met their deadline or one task failed to meet its first |
---|
560 | deadline. The following table details the time of each deadline |
---|
561 | occurrence, the maximum number of times each task may have run, |
---|
562 | the total execution time, and whether all the deadlines have |
---|
563 | been met. |
---|
564 | |
---|
565 | @ifset use-ascii |
---|
566 | @example |
---|
567 | @group |
---|
568 | +----------+------+------+------+----------------------+---------------+ |
---|
569 | | Deadline | Task | Task | Task | Total | All Deadlines | |
---|
570 | | Time | 1 | 2 | 3 | Execution Time | Met? | |
---|
571 | +----------+------+------+------+----------------------+---------------+ |
---|
572 | | 100 | 1 | 1 | 1 | 25 + 50 + 100 = 175 | NO | |
---|
573 | +----------+------+------+------+----------------------+---------------+ |
---|
574 | | 200 | 2 | 1 | 1 | 50 + 50 + 100 = 200 | YES | |
---|
575 | +----------+------+------+------+----------------------+---------------+ |
---|
576 | @end group |
---|
577 | @end example |
---|
578 | @end ifset |
---|
579 | |
---|
580 | @ifset use-tex |
---|
581 | @sp 1 |
---|
582 | @tex |
---|
583 | \centerline{\vbox{\offinterlineskip\halign{ |
---|
584 | \vrule\strut#& |
---|
585 | \hbox to 0.75in{\enskip\hfil#\hfil}& |
---|
586 | \vrule#& |
---|
587 | \hbox to 0.75in{\enskip\hfil#\hfil}& |
---|
588 | \vrule#& |
---|
589 | \hbox to 0.75in{\enskip\hfil#\hfil}& |
---|
590 | \vrule#& |
---|
591 | \hbox to 0.75in{\enskip\hfil#\hfil}& |
---|
592 | \vrule#& |
---|
593 | \hbox to 2.00in{\enskip\hfil#\hfil}& |
---|
594 | \vrule#& |
---|
595 | \hbox to 1.00in{\enskip\hfil#\hfil}& |
---|
596 | \vrule#\cr\noalign{\hrule} |
---|
597 | &\bf Deadline&& \bf Task &&\bf Task&&\bf Task&&\bf Total &&\bf All Deadlines &\cr |
---|
598 | &\bf Time && \bf 1 &&\bf 2 &&\bf 3 &&\bf Execution Time &&\bf Net?&\cr\noalign{\hrule} |
---|
599 | & 100&& 1 && 1 && 1 && 25 + 50 + 100 = 175 && NO &\cr\noalign{\hrule} |
---|
600 | & 200&& 2 && 1 && 1 && 50 + 50 + 100 = 200 && YES &\cr\noalign{\hrule} |
---|
601 | }}\hfil} |
---|
602 | @end tex |
---|
603 | @end ifset |
---|
604 | |
---|
605 | @ifset use-html |
---|
606 | @html |
---|
607 | <CENTER> |
---|
608 | <TABLE COLS=6 WIDTH="80%" BORDER=2> |
---|
609 | <TR><TD ALIGN=center><STRONG>Deadline Time</STRONG></TD> |
---|
610 | <TD ALIGN=center><STRONG>Task 1</STRONG></TD> |
---|
611 | <TD ALIGN=center><STRONG>Task 2</STRONG></TD> |
---|
612 | <TD ALIGN=center><STRONG>Task 3</STRONG></TD> |
---|
613 | <TD ALIGN=center><STRONG>Total Execution Time</STRONG></TD> |
---|
614 | <TD ALIGN=center><STRONG>All Deadlines Met?</STRONG></TD></TR> |
---|
615 | <TR><TD ALIGN=center>100</TD> |
---|
616 | <TD ALIGN=center>1</TD> |
---|
617 | <TD ALIGN=center>1</TD> |
---|
618 | <TD ALIGN=center>1</TD> |
---|
619 | <TD ALIGN=center>25 + 50 + 100 = 175</TD> |
---|
620 | <TD ALIGN=center>NO</TD></TR> |
---|
621 | <TR><TD ALIGN=center>200</TD> |
---|
622 | <TD ALIGN=center>2</TD> |
---|
623 | <TD ALIGN=center>1</TD> |
---|
624 | <TD ALIGN=center>1</TD> |
---|
625 | <TD ALIGN=center>50 + 50 + 100 = 175</TD> |
---|
626 | <TD ALIGN=center>YES</TD></TR> |
---|
627 | </TABLE> |
---|
628 | </CENTER> |
---|
629 | @end html |
---|
630 | @end ifset |
---|
631 | |
---|
632 | The key to this analysis is to recognize when each |
---|
633 | task will execute. For example at time 100, task 1 must have |
---|
634 | met its first deadline, but tasks 2 and 3 may also have begun |
---|
635 | execution. In this example, at time 100 tasks 1 and 2 have |
---|
636 | completed execution and thus have met their first deadline. |
---|
637 | Tasks 1 and 2 have used (25 + 50) = 75 time units, leaving (100 |
---|
638 | - 75) = 25 time units for task 3 to begin. Because task 3 takes |
---|
639 | 100 ticks to execute, it will not have completed execution at |
---|
640 | time 100. Thus at time 100, all of the tasks except task 3 have |
---|
641 | met their first deadline. |
---|
642 | |
---|
643 | At time 200, task 1 must have met its second deadline |
---|
644 | and task 2 its first deadline. As a result, of the first 200 |
---|
645 | time units, task 1 uses (2 * 25) = 50 and task 2 uses 50, |
---|
646 | leaving (200 - 100) time units for task 3. Task 3 requires 100 |
---|
647 | time units to execute, thus it will have completed execution at |
---|
648 | time 200. Thus, all of the tasks have met their first deadlines |
---|
649 | at time 200, and the task set is schedulable using the First |
---|
650 | Deadline Rule. |
---|
651 | |
---|
652 | @subsubsection Relaxation of Assumptions |
---|
653 | |
---|
654 | The assumptions used to develop the RMS |
---|
655 | schedulability rules are uncommon in most real-time systems. |
---|
656 | For example, it was assumed that tasks have constant unvarying |
---|
657 | execution time. It is possible to relax this assumption, simply |
---|
658 | by using the worst-case execution time of each task. |
---|
659 | |
---|
660 | Another assumption is that the tasks are independent. |
---|
661 | This means that the tasks do not wait for one another or |
---|
662 | contend for resources. This assumption can be relaxed by |
---|
663 | accounting for the amount of time a task spends waiting to |
---|
664 | acquire resources. Similarly, each task's execution time must |
---|
665 | account for any I/O performed and any RTEMS directive calls. |
---|
666 | |
---|
667 | In addition, the assumptions did not account for the |
---|
668 | time spent executing interrupt service routines. This can be |
---|
669 | accounted for by including all the processor utilization by |
---|
670 | interrupt service routines in the utilization calculation. |
---|
671 | Similarly, one should also account for the impact of delays in |
---|
672 | accessing local memory caused by direct memory access and other |
---|
673 | processors accessing local dual-ported memory. |
---|
674 | |
---|
675 | The assumption that nonperiodic tasks are used only |
---|
676 | for initialization or failure-recovery can be relaxed by placing |
---|
677 | all periodic tasks in the critical task set. This task set can |
---|
678 | be scheduled and analyzed using RMS. All nonperiodic tasks are |
---|
679 | placed in the non-critical task set. Although the critical task |
---|
680 | set can be guaranteed to execute even under transient overload, |
---|
681 | the non-critical task set is not guaranteed to execute. |
---|
682 | |
---|
683 | In conclusion, the application designer must be fully |
---|
684 | cognizant of the system and its run-time behavior when |
---|
685 | performing schedulability analysis for a system using RMS. |
---|
686 | Every hardware and software factor which impacts the execution |
---|
687 | time of each task must be accounted for in the schedulability |
---|
688 | analysis. |
---|
689 | |
---|
690 | @subsubsection Further Reading |
---|
691 | |
---|
692 | For more information on Rate Monotonic Scheduling and |
---|
693 | its schedulability analysis, the reader is referred to the |
---|
694 | following: |
---|
695 | |
---|
696 | @itemize @code{ } |
---|
697 | @item @cite{C. L. Liu and J. W. Layland. "Scheduling Algorithms for |
---|
698 | Multiprogramming in a Hard Real Time Environment." @b{Journal of |
---|
699 | the Association of Computing Machinery}. January 1973. pp. 46-61.} |
---|
700 | |
---|
701 | @item @cite{John Lehoczky, Lui Sha, and Ye Ding. "The Rate Monotonic |
---|
702 | Scheduling Algorithm: Exact Characterization and Average Case |
---|
703 | Behavior." @b{IEEE Real-Time Systems Symposium}. 1989. pp. 166-171.} |
---|
704 | |
---|
705 | @item @cite{Lui Sha and John Goodenough. "Real-Time Scheduling |
---|
706 | Theory and Ada." @b{IEEE Computer}. April 1990. pp. 53-62.} |
---|
707 | |
---|
708 | @item @cite{Alan Burns. "Scheduling hard real-time systems: a |
---|
709 | review." @b{Software Engineering Journal}. May 1991. pp. 116-128.} |
---|
710 | @end itemize |
---|
711 | |
---|
712 | @section Operations |
---|
713 | |
---|
714 | @subsection Creating a Rate Monotonic Period |
---|
715 | |
---|
716 | The @code{@value{DIRPREFIX}rate_monotonic_create} directive creates a rate |
---|
717 | monotonic period which is to be used by the calling task to |
---|
718 | delineate a period. RTEMS allocates a Period Control Block |
---|
719 | (PCB) from the PCB free list. This data structure is used by |
---|
720 | RTEMS to manage the newly created rate monotonic period. RTEMS |
---|
721 | returns a unique period ID to the application which is used by |
---|
722 | other rate monotonic manager directives to access this rate |
---|
723 | monotonic period. |
---|
724 | |
---|
725 | @subsection Manipulating a Period |
---|
726 | |
---|
727 | The @code{@value{DIRPREFIX}rate_monotonic_period} directive is used to |
---|
728 | establish and maintain periodic execution utilizing a previously |
---|
729 | created rate monotonic period. Once initiated by the |
---|
730 | @code{@value{DIRPREFIX}rate_monotonic_period} directive, the period is |
---|
731 | said to run until it either expires or is reinitiated. The state of the rate |
---|
732 | monotonic period results in one of the following scenarios: |
---|
733 | |
---|
734 | @itemize @bullet |
---|
735 | @item If the rate monotonic period is running, the calling |
---|
736 | task will be blocked for the remainder of the outstanding period |
---|
737 | and, upon completion of that period, the period will be |
---|
738 | reinitiated with the specified period. |
---|
739 | |
---|
740 | @item If the rate monotonic period is not currently running |
---|
741 | and has not expired, it is initiated with a length of period |
---|
742 | ticks and the calling task returns immediately. |
---|
743 | |
---|
744 | @item If the rate monotonic period has expired before the task |
---|
745 | invokes the @code{@value{DIRPREFIX}rate_monotonic_period} directive, |
---|
746 | the period will be initiated with a length of period ticks and the calling task |
---|
747 | returns immediately with a timeout error status. |
---|
748 | |
---|
749 | @end itemize |
---|
750 | |
---|
751 | @subsection Obtaining the Status of a Period |
---|
752 | |
---|
753 | If the @code{@value{DIRPREFIX}rate_monotonic_period} directive is invoked |
---|
754 | with a period of @code{@value{RPREFIX}PERIOD_STATUS} ticks, the current |
---|
755 | state of the specified rate monotonic period will be returned. The following |
---|
756 | table details the relationship between the period's status and |
---|
757 | the directive status code returned by the |
---|
758 | @code{@value{DIRPREFIX}rate_monotonic_period} |
---|
759 | directive: |
---|
760 | |
---|
761 | @itemize @bullet |
---|
762 | @item @code{@value{RPREFIX}SUCCESSFUL} - period is running |
---|
763 | |
---|
764 | @item @code{@value{RPREFIX}TIMEOUT} - period has expired |
---|
765 | |
---|
766 | @item @code{@value{RPREFIX}NOT_DEFINED} - period has never been initiated |
---|
767 | @end itemize |
---|
768 | |
---|
769 | Obtaining the status of a rate monotonic period does |
---|
770 | not alter the state or length of that period. |
---|
771 | |
---|
772 | @subsection Canceling a Period |
---|
773 | |
---|
774 | The @code{@value{DIRPREFIX}rate_monotonic_cancel} directive is used to stop |
---|
775 | the period maintained by the specified rate monotonic period. |
---|
776 | The period is stopped and the rate monotonic period can be |
---|
777 | reinitiated using the @code{@value{DIRPREFIX}rate_monotonic_period} directive. |
---|
778 | |
---|
779 | @subsection Deleting a Rate Monotonic Period |
---|
780 | |
---|
781 | The @code{@value{DIRPREFIX}rate_monotonic_delete} directive is used to delete |
---|
782 | a rate monotonic period. If the period is running and has not |
---|
783 | expired, the period is automatically canceled. The rate |
---|
784 | monotonic period's control block is returned to the PCB free |
---|
785 | list when it is deleted. A rate monotonic period can be deleted |
---|
786 | by a task other than the task which created the period. |
---|
787 | |
---|
788 | @subsection Examples |
---|
789 | |
---|
790 | The following sections illustrate common uses of rate |
---|
791 | monotonic periods to construct periodic tasks. |
---|
792 | |
---|
793 | @subsection Simple Periodic Task |
---|
794 | |
---|
795 | This example consists of a single periodic task |
---|
796 | which, after initialization, executes every 100 clock ticks. |
---|
797 | |
---|
798 | @page |
---|
799 | @example |
---|
800 | rtems_task Periodic_task(rtems_task_argument arg) |
---|
801 | @{ |
---|
802 | rtems_name name; |
---|
803 | rtems_id period; |
---|
804 | rtems_status_code status; |
---|
805 | |
---|
806 | name = rtems_build_name( 'P', 'E', 'R', 'D' ); |
---|
807 | |
---|
808 | status = rtems_rate_monotonic_create( name, &period ); |
---|
809 | if ( status != RTEMS_STATUS_SUCCESSFUL ) @{ |
---|
810 | printf( "rtems_monotonic_create failed with status of %d.\n", rc ); |
---|
811 | exit( 1 ); |
---|
812 | @} |
---|
813 | |
---|
814 | |
---|
815 | while ( 1 ) @{ |
---|
816 | if ( rtems_rate_monotonic_period( period, 100 ) == RTEMS_TIMEOUT ) |
---|
817 | break; |
---|
818 | |
---|
819 | /* Perform some periodic actions */ |
---|
820 | @} |
---|
821 | |
---|
822 | /* missed period so delete period and SELF */ |
---|
823 | |
---|
824 | status = rtems_rate_monotonic_delete( period ); |
---|
825 | if ( status != RTEMS_STATUS_SUCCESSFUL ) @{ |
---|
826 | printf( "rtems_rate_monotonic_delete failed with status of %d.\n", status ); |
---|
827 | exit( 1 ); |
---|
828 | @} |
---|
829 | |
---|
830 | status = rtems_task_delete( SELF ); /* should not return */ |
---|
831 | printf( "rtems_task_delete returned with status of %d.\n", status ); |
---|
832 | exit( 1 ); |
---|
833 | @} |
---|
834 | @end example |
---|
835 | |
---|
836 | The above task creates a rate monotonic period as |
---|
837 | part of its initialization. The first time the loop is |
---|
838 | executed, the @code{@value{DIRPREFIX}rate_monotonic_period} |
---|
839 | directive will initiate the period for 100 ticks and return |
---|
840 | immediately. Subsequent invocations of the |
---|
841 | @code{@value{DIRPREFIX}rate_monotonic_period} directive will result |
---|
842 | in the task blocking for the remainder of the 100 tick period. |
---|
843 | If, for any reason, the body of the loop takes more than 100 |
---|
844 | ticks to execute, the @code{@value{DIRPREFIX}rate_monotonic_period} |
---|
845 | directive will return the @code{@value{RPREFIX}TIMEOUT} status. |
---|
846 | If the above task misses its deadline, it will delete the rate |
---|
847 | monotonic period and itself. |
---|
848 | |
---|
849 | @subsection Task with Multiple Periods |
---|
850 | |
---|
851 | This example consists of a single periodic task |
---|
852 | which, after initialization, performs two sets of actions every |
---|
853 | 100 clock ticks. The first set of actions is performed in the |
---|
854 | first forty clock ticks of every 100 clock ticks, while the |
---|
855 | second set of actions is performed between the fortieth and |
---|
856 | seventieth clock ticks. The last thirty clock ticks are not |
---|
857 | used by this task. |
---|
858 | |
---|
859 | @page |
---|
860 | @example |
---|
861 | rtems_task Periodic_task(rtems_task_argument arg) |
---|
862 | @{ |
---|
863 | rtems_name name_1, name_2; |
---|
864 | rtems_id period_1, period_2; |
---|
865 | rtems_status_code status; |
---|
866 | |
---|
867 | name_1 = rtems_build_name( 'P', 'E', 'R', '1' ); |
---|
868 | name_2 = rtems_build_name( 'P', 'E', 'R', '2' ); |
---|
869 | |
---|
870 | (void ) rtems_rate_monotonic_create( name_1, &period_1 ); |
---|
871 | (void ) rtems_rate_monotonic_create( name_2, &period_2 ); |
---|
872 | |
---|
873 | while ( 1 ) @{ |
---|
874 | if ( rtems_rate_monotonic_period( period_1, 100 ) == TIMEOUT ) |
---|
875 | break; |
---|
876 | |
---|
877 | if ( rtems_rate_monotonic_period( period_2, 40 ) == TIMEOUT ) |
---|
878 | break; |
---|
879 | |
---|
880 | /* |
---|
881 | * Perform first set of actions between clock |
---|
882 | * ticks 0 and 39 of every 100 ticks. |
---|
883 | */ |
---|
884 | |
---|
885 | if ( rtems_rate_monotonic_period( period_2, 30 ) == TIMEOUT ) |
---|
886 | break; |
---|
887 | |
---|
888 | /* |
---|
889 | * Perform second set of actions between clock 40 and 69 |
---|
890 | * of every 100 ticks. THEN ... |
---|
891 | * |
---|
892 | * Check to make sure we didn't miss the period_2 period. |
---|
893 | */ |
---|
894 | |
---|
895 | if ( rtems_rate_monotonic_period( period_2, STATUS ) == TIMEOUT ) |
---|
896 | break; |
---|
897 | |
---|
898 | (void) rtems_rate_monotonic_cancel( period_2 ); |
---|
899 | @} |
---|
900 | |
---|
901 | /* missed period so delete period and SELF */ |
---|
902 | |
---|
903 | (void ) rtems_rate_monotonic_delete( period_1 ); |
---|
904 | (void ) rtems_rate_monotonic_delete( period_2 ); |
---|
905 | (void ) task_delete( SELF ); |
---|
906 | @} |
---|
907 | @end example |
---|
908 | |
---|
909 | The above task creates two rate monotonic periods as |
---|
910 | part of its initialization. The first time the loop is |
---|
911 | executed, the @code{@value{DIRPREFIX}rate_monotonic_period} |
---|
912 | directive will initiate the period_1 period for 100 ticks |
---|
913 | and return immediately. Subsequent invocations of the |
---|
914 | @code{@value{DIRPREFIX}rate_monotonic_period} directive |
---|
915 | for period_1 will result in the task blocking for the remainder |
---|
916 | of the 100 tick period. The period_2 period is used to control |
---|
917 | the execution time of the two sets of actions within each 100 |
---|
918 | tick period established by period_1. The |
---|
919 | @code{@value{DIRPREFIX}rate_monotonic_cancel( period_2 )} |
---|
920 | call is performed to ensure that the period_2 period |
---|
921 | does not expire while the task is blocked on the period_1 |
---|
922 | period. If this cancel operation were not performed, every time |
---|
923 | the @code{@value{DIRPREFIX}rate_monotonic_period( period_2, 40 )} |
---|
924 | call is executed, except for the initial one, a directive status |
---|
925 | of @code{@value{RPREFIX}TIMEOUT} is returned. It is important to |
---|
926 | note that every time this call is made, the period_2 period will be |
---|
927 | initiated immediately and the task will not block. |
---|
928 | |
---|
929 | If, for any reason, the task misses any deadline, the |
---|
930 | @code{@value{DIRPREFIX}rate_monotonic_period} directive will |
---|
931 | return the @code{@value{RPREFIX}TIMEOUT} |
---|
932 | directive status. If the above task misses its deadline, it |
---|
933 | will delete the rate monotonic periods and itself. |
---|
934 | |
---|
935 | @section Directives |
---|
936 | |
---|
937 | This section details the rate monotonic manager's |
---|
938 | directives. A subsection is dedicated to each of this manager's |
---|
939 | directives and describes the calling sequence, related |
---|
940 | constants, usage, and status codes. |
---|
941 | |
---|
942 | @c |
---|
943 | @c |
---|
944 | @c |
---|
945 | @page |
---|
946 | @subsection RATE_MONOTONIC_CREATE - Create a rate monotonic period |
---|
947 | |
---|
948 | @cindex create a period |
---|
949 | |
---|
950 | @subheading CALLING SEQUENCE: |
---|
951 | |
---|
952 | @ifset is-C |
---|
953 | @findex rtems_rate_monotonic_create |
---|
954 | @example |
---|
955 | rtems_status_code rtems_rate_monotonic_create( |
---|
956 | rtems_name name, |
---|
957 | rtems_id *id |
---|
958 | ); |
---|
959 | @end example |
---|
960 | @end ifset |
---|
961 | |
---|
962 | @ifset is-Ada |
---|
963 | @example |
---|
964 | procedure Rate_Monotonic_Create ( |
---|
965 | Name : in RTEMS.Name; |
---|
966 | ID : out RTEMS.ID; |
---|
967 | Result : out RTEMS.Status_Codes |
---|
968 | ); |
---|
969 | @end example |
---|
970 | @end ifset |
---|
971 | |
---|
972 | @subheading DIRECTIVE STATUS CODES: |
---|
973 | @code{@value{RPREFIX}SUCCESSFUL} - rate monotonic period created successfully@* |
---|
974 | @code{@value{RPREFIX}INVALID_NAME} - invalid period name@* |
---|
975 | @code{@value{RPREFIX}TOO_MANY} - too many periods created |
---|
976 | |
---|
977 | @subheading DESCRIPTION: |
---|
978 | |
---|
979 | This directive creates a rate monotonic period. The |
---|
980 | assigned rate monotonic id is returned in id. This id is used |
---|
981 | to access the period with other rate monotonic manager |
---|
982 | directives. For control and maintenance of the rate monotonic |
---|
983 | period, RTEMS allocates a PCB from the local PCB free pool and |
---|
984 | initializes it. |
---|
985 | |
---|
986 | @subheading NOTES: |
---|
987 | |
---|
988 | This directive will not cause the calling task to be |
---|
989 | preempted. |
---|
990 | |
---|
991 | @c |
---|
992 | @c |
---|
993 | @c |
---|
994 | @page |
---|
995 | @subsection RATE_MONOTONIC_IDENT - Get ID of a period |
---|
996 | |
---|
997 | @cindex get ID of a period |
---|
998 | @cindex obtain ID of a period |
---|
999 | |
---|
1000 | @subheading CALLING SEQUENCE: |
---|
1001 | |
---|
1002 | @ifset is-C |
---|
1003 | @findex rtems_rate_monotonic_ident |
---|
1004 | @example |
---|
1005 | rtems_status_code rtems_rate_monotonic_ident( |
---|
1006 | rtems_name name, |
---|
1007 | rtems_id *id |
---|
1008 | ); |
---|
1009 | @end example |
---|
1010 | @end ifset |
---|
1011 | |
---|
1012 | @ifset is-Ada |
---|
1013 | @example |
---|
1014 | procedure Rate_Monotonic_Ident ( |
---|
1015 | Name : in RTEMS.Name; |
---|
1016 | ID : out RTEMS.ID; |
---|
1017 | Result : out RTEMS.Status_Codes |
---|
1018 | ); |
---|
1019 | @end example |
---|
1020 | @end ifset |
---|
1021 | |
---|
1022 | @subheading DIRECTIVE STATUS CODES: |
---|
1023 | @code{@value{RPREFIX}SUCCESSFUL} - period identified successfully@* |
---|
1024 | @code{@value{RPREFIX}INVALID_NAME} - period name not found |
---|
1025 | |
---|
1026 | @subheading DESCRIPTION: |
---|
1027 | |
---|
1028 | This directive obtains the period id associated with |
---|
1029 | the period name to be acquired. If the period name is not |
---|
1030 | unique, then the period id will match one of the periods with |
---|
1031 | that name. However, this period id is not guaranteed to |
---|
1032 | correspond to the desired period. The period id is used to |
---|
1033 | access this period in other rate monotonic manager directives. |
---|
1034 | |
---|
1035 | @subheading NOTES: |
---|
1036 | |
---|
1037 | This directive will not cause the running task to be |
---|
1038 | preempted. |
---|
1039 | |
---|
1040 | @c |
---|
1041 | @c |
---|
1042 | @c |
---|
1043 | @page |
---|
1044 | @subsection RATE_MONOTONIC_CANCEL - Cancel a period |
---|
1045 | |
---|
1046 | @cindex cancel a period |
---|
1047 | |
---|
1048 | @subheading CALLING SEQUENCE: |
---|
1049 | |
---|
1050 | @ifset is-C |
---|
1051 | @findex rtems_rate_monotonic_cancel |
---|
1052 | @example |
---|
1053 | rtems_status_code rtems_rate_monotonic_cancel( |
---|
1054 | rtems_id id |
---|
1055 | ); |
---|
1056 | @end example |
---|
1057 | @end ifset |
---|
1058 | |
---|
1059 | @ifset is-Ada |
---|
1060 | @example |
---|
1061 | procedure Rate_Monotonic_Cancel ( |
---|
1062 | ID : in RTEMS.ID; |
---|
1063 | Result : out RTEMS.Status_Codes |
---|
1064 | ); |
---|
1065 | @end example |
---|
1066 | @end ifset |
---|
1067 | |
---|
1068 | @subheading DIRECTIVE STATUS CODES: |
---|
1069 | @code{@value{RPREFIX}SUCCESSFUL} - period canceled successfully@* |
---|
1070 | @code{@value{RPREFIX}INVALID_ID} - invalid rate monotonic period id@* |
---|
1071 | @code{@value{RPREFIX}NOT_OWNER_OF_RESOURCE} - rate monotonic period not created by calling task |
---|
1072 | |
---|
1073 | @subheading DESCRIPTION: |
---|
1074 | |
---|
1075 | This directive cancels the rate monotonic period id. |
---|
1076 | This period will be reinitiated by the next invocation of |
---|
1077 | @code{@value{DIRPREFIX}rate_monotonic_period} with id. |
---|
1078 | |
---|
1079 | @subheading NOTES: |
---|
1080 | |
---|
1081 | This directive will not cause the running task to be |
---|
1082 | preempted. |
---|
1083 | |
---|
1084 | The rate monotonic period specified by id must have |
---|
1085 | been created by the calling task. |
---|
1086 | |
---|
1087 | @c |
---|
1088 | @c |
---|
1089 | @c |
---|
1090 | @page |
---|
1091 | @subsection RATE_MONOTONIC_DELETE - Delete a rate monotonic period |
---|
1092 | |
---|
1093 | @cindex delete a period |
---|
1094 | |
---|
1095 | @subheading CALLING SEQUENCE: |
---|
1096 | |
---|
1097 | @ifset is-C |
---|
1098 | @findex rtems_rate_monotonic_delete |
---|
1099 | @example |
---|
1100 | rtems_status_code rtems_rate_monotonic_delete( |
---|
1101 | rtems_id id |
---|
1102 | ); |
---|
1103 | @end example |
---|
1104 | @end ifset |
---|
1105 | |
---|
1106 | @ifset is-Ada |
---|
1107 | @example |
---|
1108 | procedure Rate_Monotonic_Delete ( |
---|
1109 | ID : in RTEMS.ID; |
---|
1110 | Result : out RTEMS.Status_Codes |
---|
1111 | ); |
---|
1112 | @end example |
---|
1113 | @end ifset |
---|
1114 | |
---|
1115 | @subheading DIRECTIVE STATUS CODES: |
---|
1116 | @code{@value{RPREFIX}SUCCESSFUL} - period deleted successfully@* |
---|
1117 | @code{@value{RPREFIX}INVALID_ID} - invalid rate monotonic period id |
---|
1118 | |
---|
1119 | @subheading DESCRIPTION: |
---|
1120 | |
---|
1121 | This directive deletes the rate monotonic period |
---|
1122 | specified by id. If the period is running, it is automatically |
---|
1123 | canceled. The PCB for the deleted period is reclaimed by RTEMS. |
---|
1124 | |
---|
1125 | @subheading NOTES: |
---|
1126 | |
---|
1127 | This directive will not cause the running task to be |
---|
1128 | preempted. |
---|
1129 | |
---|
1130 | A rate monotonic period can be deleted by a task |
---|
1131 | other than the task which created the period. |
---|
1132 | |
---|
1133 | @c |
---|
1134 | @c |
---|
1135 | @c |
---|
1136 | @page |
---|
1137 | @subsection RATE_MONOTONIC_PERIOD - Conclude current/Start next period |
---|
1138 | |
---|
1139 | @cindex conclude current period |
---|
1140 | @cindex start current period |
---|
1141 | @cindex period initiation |
---|
1142 | |
---|
1143 | @subheading CALLING SEQUENCE: |
---|
1144 | |
---|
1145 | @ifset is-C |
---|
1146 | @findex rtems_rate_monotonic_period |
---|
1147 | @example |
---|
1148 | rtems_status_code rtems_rate_monotonic_period( |
---|
1149 | rtems_id id, |
---|
1150 | rtems_interval length |
---|
1151 | ); |
---|
1152 | @end example |
---|
1153 | @end ifset |
---|
1154 | |
---|
1155 | @ifset is-Ada |
---|
1156 | @example |
---|
1157 | procedure Rate_Monotonic_Period ( |
---|
1158 | ID : in RTEMS.ID; |
---|
1159 | Length : in RTEMS.Interval; |
---|
1160 | Result : out RTEMS.Status_Codes |
---|
1161 | ); |
---|
1162 | @end example |
---|
1163 | @end ifset |
---|
1164 | |
---|
1165 | @subheading DIRECTIVE STATUS CODES: |
---|
1166 | @code{@value{RPREFIX}SUCCESSFUL} - period initiated successfully@* |
---|
1167 | @code{@value{RPREFIX}INVALID_ID} - invalid rate monotonic period id@* |
---|
1168 | @code{@value{RPREFIX}NOT_OWNER_OF_RESOURCE} - period not created by calling task@* |
---|
1169 | @code{@value{RPREFIX}NOT_DEFINED} - period has never been initiated (only |
---|
1170 | possible when period is set to PERIOD_STATUS)@* |
---|
1171 | @code{@value{RPREFIX}TIMEOUT} - period has expired |
---|
1172 | |
---|
1173 | @subheading DESCRIPTION: |
---|
1174 | |
---|
1175 | This directive initiates the rate monotonic period id |
---|
1176 | with a length of period ticks. If id is running, then the |
---|
1177 | calling task will block for the remainder of the period before |
---|
1178 | reinitiating the period with the specified period. If id was |
---|
1179 | not running (either expired or never initiated), the period is |
---|
1180 | immediately initiated and the directive returns immediately. |
---|
1181 | |
---|
1182 | If invoked with a period of @code{@value{RPREFIX}PERIOD_STATUS} ticks, the |
---|
1183 | current state of id will be returned. The directive status |
---|
1184 | indicates the current state of the period. This does not alter |
---|
1185 | the state or period of the period. |
---|
1186 | |
---|
1187 | @subheading NOTES: |
---|
1188 | |
---|
1189 | This directive will not cause the running task to be preempted. |
---|
1190 | |
---|
1191 | @c |
---|
1192 | @c |
---|
1193 | @c |
---|
1194 | @page |
---|
1195 | @subsection RATE_MONOTONIC_GET_STATUS - Obtain status from a period |
---|
1196 | |
---|
1197 | @cindex get status of period |
---|
1198 | @cindex obtain status of period |
---|
1199 | |
---|
1200 | @subheading CALLING SEQUENCE: |
---|
1201 | |
---|
1202 | @ifset is-C |
---|
1203 | @findex rtems_rate_monotonic_get_status |
---|
1204 | @example |
---|
1205 | rtems_status_code rtems_rate_monotonic_get_status( |
---|
1206 | rtems_id id, |
---|
1207 | rtems_rate_monotonic_period_status *status |
---|
1208 | ); |
---|
1209 | @end example |
---|
1210 | @end ifset |
---|
1211 | |
---|
1212 | @ifset is-Ada |
---|
1213 | @example |
---|
1214 | procedure Rate_Monotonic_Get_Status ( |
---|
1215 | ID : in RTEMS.ID; |
---|
1216 | Status : out RTEMS.Rate_Monotonic_Period_Status; |
---|
1217 | Result : out RTEMS.Status_Codes |
---|
1218 | ); |
---|
1219 | @end example |
---|
1220 | @end ifset |
---|
1221 | |
---|
1222 | @subheading DIRECTIVE STATUS CODES: |
---|
1223 | @code{@value{RPREFIX}SUCCESSFUL} - period initiated successfully@* |
---|
1224 | @code{@value{RPREFIX}INVALID_ID} - invalid rate monotonic period id@* |
---|
1225 | @code{@value{RPREFIX}INVALID_ADDRESS} - invalid address of status@* |
---|
1226 | |
---|
1227 | @subheading DESCRIPTION: |
---|
1228 | |
---|
1229 | This directive returns status information associated with |
---|
1230 | the rate monotonic period id in the following data @value{STRUCTURE}: |
---|
1231 | |
---|
1232 | @ifset is-C |
---|
1233 | @findex rtems_rate_monotonic_period_status |
---|
1234 | @example |
---|
1235 | typedef struct @{ |
---|
1236 | rtems_id owner; |
---|
1237 | rtems_rate_monotonic_period_states state; |
---|
1238 | rtems_rate_monotonic_period_time_t since_last_period; |
---|
1239 | rtems_thread_cpu_usage_t executed_since_last_period; |
---|
1240 | @} rtems_rate_monotonic_period_status; |
---|
1241 | @end example |
---|
1242 | @end ifset |
---|
1243 | |
---|
1244 | @ifset is-Ada |
---|
1245 | @example |
---|
1246 | type Rate_Monotonic_Period_Status is |
---|
1247 | begin |
---|
1248 | Owner : RTEMS.ID; |
---|
1249 | State : RTEMS.Rate_Monotonic_Period_States; |
---|
1250 | Since_Last_Period : RTEMS.Unsigned32; |
---|
1251 | Executed_Since_Last_Period : RTEMS.Unsigned32; |
---|
1252 | end record; |
---|
1253 | @end example |
---|
1254 | @end ifset |
---|
1255 | |
---|
1256 | @c RATE_MONOTONIC_INACTIVE does not have RTEMS_ in front of it. |
---|
1257 | |
---|
1258 | A configure time option can be used to select whether the time information is |
---|
1259 | given in ticks or seconds and nanoseconds. The default is seconds and |
---|
1260 | nanoseconds. If the period's state is @code{RATE_MONOTONIC_INACTIVE}, both |
---|
1261 | time values will be set to 0. Otherwise, both time values will contain |
---|
1262 | time information since the last invocation of the |
---|
1263 | @code{@value{DIRPREFIX}rate_monotonic_period} directive. More |
---|
1264 | specifically, the (ticks_)since_last_period value contains the elapsed time |
---|
1265 | which has occurred since the last invocation of the |
---|
1266 | @code{@value{DIRPREFIX}rate_monotonic_period} directive and the |
---|
1267 | (ticks_)executed_since_last_period contains how much processor time the |
---|
1268 | owning task has consumed since the invocation of the |
---|
1269 | @code{@value{DIRPREFIX}rate_monotonic_period} directive. |
---|
1270 | |
---|
1271 | @subheading NOTES: |
---|
1272 | |
---|
1273 | This directive will not cause the running task to be preempted. |
---|
1274 | |
---|
1275 | @c |
---|
1276 | @c |
---|
1277 | @c |
---|
1278 | @page |
---|
1279 | @subsection RATE_MONOTONIC_GET_STATISTICS - Obtain statistics from a period |
---|
1280 | |
---|
1281 | @cindex get statistics of period |
---|
1282 | @cindex obtain statistics of period |
---|
1283 | |
---|
1284 | @subheading CALLING SEQUENCE: |
---|
1285 | |
---|
1286 | @ifset is-C |
---|
1287 | @findex rtems_rate_monotonic_get_statistics |
---|
1288 | @example |
---|
1289 | rtems_status_code rtems_rate_monotonic_get_statistics( |
---|
1290 | rtems_id id, |
---|
1291 | rtems_rate_monotonic_period_statistics *statistics |
---|
1292 | ); |
---|
1293 | @end example |
---|
1294 | @end ifset |
---|
1295 | |
---|
1296 | @ifset is-Ada |
---|
1297 | @example |
---|
1298 | NOT SUPPORTED FROM Ada BINDING |
---|
1299 | @end example |
---|
1300 | @end ifset |
---|
1301 | |
---|
1302 | @subheading DIRECTIVE STATUS CODES: |
---|
1303 | @code{@value{RPREFIX}SUCCESSFUL} - period initiated successfully@* |
---|
1304 | @code{@value{RPREFIX}INVALID_ID} - invalid rate monotonic period id@* |
---|
1305 | @code{@value{RPREFIX}INVALID_ADDRESS} - invalid address of statistics@* |
---|
1306 | |
---|
1307 | @subheading DESCRIPTION: |
---|
1308 | |
---|
1309 | This directive returns statistics information associated with |
---|
1310 | the rate monotonic period id in the following data @value{STRUCTURE}: |
---|
1311 | |
---|
1312 | @ifset is-C |
---|
1313 | @findex rtems_rate_monotonic_period_statistics |
---|
1314 | @example |
---|
1315 | typedef struct @{ |
---|
1316 | uint32_t count; |
---|
1317 | uint32_t missed_count; |
---|
1318 | #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS |
---|
1319 | struct timespec min_cpu_time; |
---|
1320 | struct timespec max_cpu_time; |
---|
1321 | struct timespec total_cpu_time; |
---|
1322 | #else |
---|
1323 | uint32_t min_cpu_time; |
---|
1324 | uint32_t max_cpu_time; |
---|
1325 | uint32_t total_cpu_time; |
---|
1326 | #endif |
---|
1327 | #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS |
---|
1328 | struct timespec min_wall_time; |
---|
1329 | struct timespec max_wall_time; |
---|
1330 | struct timespec total_wall_time; |
---|
1331 | #else |
---|
1332 | uint32_t min_wall_time; |
---|
1333 | uint32_t max_wall_time; |
---|
1334 | uint32_t total_wall_time; |
---|
1335 | #endif |
---|
1336 | @} rtems_rate_monotonic_period_statistics; |
---|
1337 | @end example |
---|
1338 | @end ifset |
---|
1339 | |
---|
1340 | @ifset is-Ada |
---|
1341 | @example |
---|
1342 | NOT SUPPORTED FROM Ada BINDING |
---|
1343 | @end example |
---|
1344 | @end ifset |
---|
1345 | |
---|
1346 | This directive returns the current statistics information for |
---|
1347 | the period instance assocaited with @code{id}. The information |
---|
1348 | returned is indicated by the structure above. |
---|
1349 | |
---|
1350 | @subheading NOTES: |
---|
1351 | |
---|
1352 | This directive will not cause the running task to be preempted. |
---|
1353 | |
---|
1354 | @c |
---|
1355 | @c |
---|
1356 | @c |
---|
1357 | @page |
---|
1358 | @subsection RATE_MONOTONIC_RESET_STATISTICS - Reset statistics for a period |
---|
1359 | |
---|
1360 | @cindex reset statistics of period |
---|
1361 | |
---|
1362 | @subheading CALLING SEQUENCE: |
---|
1363 | |
---|
1364 | @ifset is-C |
---|
1365 | @findex rtems_rate_monotonic_reset_statistics |
---|
1366 | @example |
---|
1367 | rtems_status_code rtems_rate_monotonic_reset_statistics( |
---|
1368 | rtems_id id |
---|
1369 | ); |
---|
1370 | @end example |
---|
1371 | @end ifset |
---|
1372 | |
---|
1373 | @ifset is-Ada |
---|
1374 | @example |
---|
1375 | procedure Rate_Monotonic_Reset_Statistics ( |
---|
1376 | ID : in RTEMS.ID; |
---|
1377 | Result : out RTEMS.Status_Codes |
---|
1378 | ); |
---|
1379 | @end example |
---|
1380 | @end ifset |
---|
1381 | |
---|
1382 | @subheading DIRECTIVE STATUS CODES: |
---|
1383 | @code{@value{RPREFIX}SUCCESSFUL} - period initiated successfully@* |
---|
1384 | @code{@value{RPREFIX}INVALID_ID} - invalid rate monotonic period id@* |
---|
1385 | |
---|
1386 | @subheading DESCRIPTION: |
---|
1387 | |
---|
1388 | This directive resets the statistics information associated with |
---|
1389 | this rate monotonic period instance. |
---|
1390 | |
---|
1391 | @subheading NOTES: |
---|
1392 | |
---|
1393 | This directive will not cause the running task to be preempted. |
---|
1394 | |
---|
1395 | @c |
---|
1396 | @c |
---|
1397 | @c |
---|
1398 | @page |
---|
1399 | @subsection RATE_MONOTONIC_RESET_ALL_STATISTICS - Reset statistics for all periods |
---|
1400 | |
---|
1401 | @cindex reset statistics of all periods |
---|
1402 | |
---|
1403 | @subheading CALLING SEQUENCE: |
---|
1404 | |
---|
1405 | @ifset is-C |
---|
1406 | @findex rtems_rate_monotonic_reset_all_statistics |
---|
1407 | @example |
---|
1408 | void rtems_rate_monotonic_reset_all_statistics(void); |
---|
1409 | @end example |
---|
1410 | @end ifset |
---|
1411 | |
---|
1412 | @ifset is-Ada |
---|
1413 | @example |
---|
1414 | procedure Rate_Monotonic_Reset_All_Statistics; |
---|
1415 | @end example |
---|
1416 | @end ifset |
---|
1417 | |
---|
1418 | @subheading DIRECTIVE STATUS CODES: |
---|
1419 | |
---|
1420 | NONE |
---|
1421 | |
---|
1422 | @subheading DESCRIPTION: |
---|
1423 | |
---|
1424 | This directive resets the statistics information associated with |
---|
1425 | all rate monotonic period instances. |
---|
1426 | |
---|
1427 | @subheading NOTES: |
---|
1428 | |
---|
1429 | This directive will not cause the running task to be preempted. |
---|
1430 | |
---|
1431 | @c |
---|
1432 | @c |
---|
1433 | @c |
---|
1434 | @page |
---|
1435 | @subsection RATE_MONOTONIC_REPORT_STATISTICS - Print period statistics report |
---|
1436 | |
---|
1437 | @cindex print period statistics report |
---|
1438 | @cindex period statistics report |
---|
1439 | |
---|
1440 | @subheading CALLING SEQUENCE: |
---|
1441 | |
---|
1442 | @ifset is-C |
---|
1443 | @findex rtems_rate_monotonic_report_statistics |
---|
1444 | @example |
---|
1445 | void rtems_rate_monotonic_report_statistics(void); |
---|
1446 | @end example |
---|
1447 | @end ifset |
---|
1448 | |
---|
1449 | @ifset is-Ada |
---|
1450 | @example |
---|
1451 | procedure Rate_Monotonic_Report_Statistics; |
---|
1452 | @end example |
---|
1453 | @end ifset |
---|
1454 | |
---|
1455 | @subheading DIRECTIVE STATUS CODES: |
---|
1456 | |
---|
1457 | NONE |
---|
1458 | |
---|
1459 | @subheading DESCRIPTION: |
---|
1460 | |
---|
1461 | This directive prints a report on all active periods which have |
---|
1462 | executed at least one period. The following is an example of the |
---|
1463 | output generated by this directive. |
---|
1464 | |
---|
1465 | @ifset is-C |
---|
1466 | @findex rtems_rate_monotonic_period_statistics |
---|
1467 | @example |
---|
1468 | ID OWNER PERIODS MISSED CPU TIME WALL TIME |
---|
1469 | MIN/MAX/AVG MIN/MAX/AVG |
---|
1470 | 0x42010001 TA1 502 0 0/1/0.99 0/0/0.00 |
---|
1471 | 0x42010002 TA2 502 0 0/1/0.99 0/0/0.00 |
---|
1472 | 0x42010003 TA3 501 0 0/1/0.99 0/0/0.00 |
---|
1473 | 0x42010004 TA4 501 0 0/1/0.99 0/0/0.00 |
---|
1474 | 0x42010005 TA5 10 0 0/1/0.90 0/0/0.00 |
---|
1475 | @end example |
---|
1476 | @end ifset |
---|
1477 | |
---|
1478 | @subheading NOTES: |
---|
1479 | |
---|
1480 | This directive will not cause the running task to be preempted. |
---|