source: rtems/doc/posix_users/sched.texi @ ae68ff0

4.104.114.84.95
Last change on this file since ae68ff0 was ae68ff0, checked in by Joel Sherrill <joel.sherrill@…>, on 05/27/97 at 12:40:11

Initial revision

  • Property mode set to 100644
File size: 5.1 KB
Line 
1@c
2@c  COPYRIGHT (c) 1996.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6
7@ifinfo
8@node Scheduler Manager, Scheduler Manager Introduction, time, Top
9@end ifinfo
10@chapter Scheduler Manager
11@ifinfo
12@menu
13* Scheduler Manager Introduction::
14* Scheduler Manager Background::
15* Scheduler Manager Operations::
16* Scheduler Manager Directives::
17@end menu
18@end ifinfo
19
20@ifinfo
21@node Scheduler Manager Introduction, Scheduler Manager Background, Scheduler Manager, Scheduler Manager
22@end ifinfo
23@section Introduction
24
25The scheduler manager ...
26
27The directives provided by the scheduler manager are:
28
29@itemize @bullet
30@item @code{sched_get_priority_min} -
31@item @code{sched_get_priority_max} -
32@item @code{sched_rr_get_interval} -
33@item @code{sched_yield} -
34@end itemize
35
36@ifinfo
37@node Scheduler Manager Background, Priority, Scheduler Manager Introduction, Scheduler Manager
38@end ifinfo
39@section Background
40@ifinfo
41@menu
42* Priority::
43* Scheduling Policies::
44@end menu
45@end ifinfo
46
47@ifinfo
48@node Priority, Scheduling Policies, Scheduler Manager Background, Scheduler Manager Background
49@end ifinfo
50@subsection Priority
51
52In the RTEMS implementation of the POSIX API, the priorities range from
53the low priority of sched_get_priority_min() to the highest priority of
54sched_get_priority_max().  Numerically higher values represent higher
55priorities.
56
57@ifinfo
58@node Scheduling Policies, Scheduler Manager Operations, Priority, Scheduler Manager Background
59@end ifinfo
60@subsection Scheduling Policies
61
62The following scheduling policies are available:
63
64@table @b
65@item SCHED_FIFO
66Priority-based, preemptive scheduling with no timeslicing.  This is equivalent
67to what is called "manual round-robin" scheduling.
68
69@item SCHED_RR
70Priority-based, preemptive scheduling with timeslicing.  Time quantums are
71maintained on a per-thread basis and are not reset at each context switch.
72Thus, a thread which is preempted and subsequently resumes execution will
73attempt to complete the unused portion of its time quantum.
74
75@item SCHED_OTHER
76Priority-based, preemptive scheduling with timeslicing.  Time quantums are
77maintained on a per-thread basis and are reset at each context switch.
78
79@item SCHED_SPORADIC
80Priority-based, preemptive scheduling utilizing three additional parameters:
81budget, replenishment period, and low priority.  Under this policy, the
82thread is allowed to execute for "budget" amount of time before its priority
83is lowered to "low priority".  At the end of each replenishment period,
84the thread resumes its initial priority and has its budget replenished.
85
86@end table
87
88@ifinfo
89@node Scheduler Manager Operations, Scheduler Manager Directives, Scheduling Policies, Scheduler Manager
90@end ifinfo
91@section Operations
92
93@ifinfo
94@node Scheduler Manager Directives, sched_get_priority_min, Scheduler Manager Operations, Scheduler Manager
95@end ifinfo
96@section Directives
97@ifinfo
98@menu
99* sched_get_priority_min::
100* sched_get_priority_max::
101* sched_rr_get_interval::
102* sched_yield::
103@end menu
104@end ifinfo
105
106This section details the scheduler manager's directives.
107A subsection is dedicated to each of this manager's directives
108and describes the calling sequence, related constants, usage,
109and status codes.
110
111@page
112@ifinfo
113@node sched_get_priority_min, sched_get_priority_max, Scheduler Manager Directives, Scheduler Manager Directives
114@end ifinfo
115@subsection sched_get_priority_min
116
117@subheading CALLING SEQUENCE:
118
119@example
120#include <sched.h>
121
122int sched_get_priority_min(
123  int policy
124);
125@end example
126
127@subheading STATUS CODES:
128
129On error, this routine returns -1 and sets errno to one of the following:
130
131@table @b
132@item EINVAL
133The indicated policy is invalid.
134 
135@end table
136
137@subheading DESCRIPTION:
138
139@subheading NOTES:
140
141@page
142@ifinfo
143@node sched_get_priority_max, sched_rr_get_interval, sched_get_priority_min, Scheduler Manager Directives
144@end ifinfo
145@subsection sched_get_priority_max
146
147@subheading CALLING SEQUENCE:
148
149@example
150#include <sched.h>
151
152int sched_get_priority_max(
153  int policy
154);
155@end example
156
157@subheading STATUS CODES:
158
159On error, this routine returns -1 and sets errno to one of the following:
160
161@table @b
162@item EINVAL
163The indicated policy is invalid.
164 
165@end table
166
167@subheading DESCRIPTION:
168
169@subheading NOTES:
170
171@page
172@ifinfo
173@node sched_rr_get_interval, sched_yield, sched_get_priority_max, Scheduler Manager Directives
174@end ifinfo
175@subsection sched_rr_get_interval
176
177@subheading CALLING SEQUENCE:
178
179@example
180#include <sched.h>
181
182int sched_rr_get_interval(
183  pid_t            pid,
184  struct timespec *interval
185);
186@end example
187
188@subheading STATUS CODES:
189
190On error, this routine returns -1 and sets errno to one of the following:
191
192@table @b
193@item ESRCH
194The indicated process id is invalid.
195 
196@item EINVAL
197The specified interval pointer parameter is invalid.
198
199@end table
200
201@subheading DESCRIPTION:
202
203@subheading NOTES:
204
205@page
206@ifinfo
207@node sched_yield, Command and Variable Index, sched_rr_get_interval, Scheduler Manager Directives
208@end ifinfo
209@subsection sched_yield
210
211@subheading CALLING SEQUENCE:
212
213@example
214#include <sched.h>
215
216int sched_yield( void );
217@end example
218
219@subheading STATUS CODES:
220
221This routine always returns zero to indicate success.
222
223@subheading DESCRIPTION:
224
225@subheading NOTES:
226
Note: See TracBrowser for help on using the repository browser.