source: rtems/doc/posix_users/sched.texi @ 1e524995

4.104.114.84.95
Last change on this file since 1e524995 was 1e524995, checked in by Joel Sherrill <joel.sherrill@…>, on 02/06/98 at 14:14:30

Updated copyrights

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