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

4.104.114.84.95
Last change on this file since c4dddee was c4dddee, checked in by Joel Sherrill <joel.sherrill@…>, on 11/19/98 at 16:06:46

Major update/merge of POSIX manual.

  • Property mode set to 100644
File size: 3.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} -
19@item @code{sched_get_priority_max} -
20@item @code{sched_rr_get_interval} -
21@item @code{sched_yield} -
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 sched_get_priority_min() to the highest priority of
30sched_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@page
73@subsection sched_get_priority_min
74
75@subheading CALLING SEQUENCE:
76
77@example
78#include <sched.h>
79
80int sched_get_priority_min(
81  int policy
82);
83@end example
84
85@subheading STATUS CODES:
86
87On error, this routine returns -1 and sets errno to one of the following:
88
89@table @b
90@item EINVAL
91The indicated policy is invalid.
92 
93@end table
94
95@subheading DESCRIPTION:
96
97@subheading NOTES:
98
99@page
100@subsection sched_get_priority_max
101
102@subheading CALLING SEQUENCE:
103
104@example
105#include <sched.h>
106
107int sched_get_priority_max(
108  int policy
109);
110@end example
111
112@subheading STATUS CODES:
113
114On error, this routine returns -1 and sets errno to one of the following:
115
116@table @b
117@item EINVAL
118The indicated policy is invalid.
119 
120@end table
121
122@subheading DESCRIPTION:
123
124@subheading NOTES:
125
126@page
127@subsection sched_rr_get_interval
128
129@subheading CALLING SEQUENCE:
130
131@example
132#include <sched.h>
133
134int sched_rr_get_interval(
135  pid_t            pid,
136  struct timespec *interval
137);
138@end example
139
140@subheading STATUS CODES:
141
142On error, this routine returns -1 and sets errno to one of the following:
143
144@table @b
145@item ESRCH
146The indicated process id is invalid.
147 
148@item EINVAL
149The specified interval pointer parameter is invalid.
150
151@end table
152
153@subheading DESCRIPTION:
154
155@subheading NOTES:
156
157@page
158@subsection sched_yield
159
160@subheading CALLING SEQUENCE:
161
162@example
163#include <sched.h>
164
165int sched_yield( void );
166@end example
167
168@subheading STATUS CODES:
169
170This routine always returns zero to indicate success.
171
172@subheading DESCRIPTION:
173
174@subheading NOTES:
175
Note: See TracBrowser for help on using the repository browser.