source: rtems/doc/posix_users/sched.t @ 7479042

4.104.114.84.95
Last change on this file since 7479042 was 7479042, checked in by Joel Sherrill <joel.sherrill@…>, on 10/11/99 at 21:24:38

Generated concept and function index entries.

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