source: rtems/doc/new_chapters/sched.t @ 571a915

4.104.114.84.95
Last change on this file since 571a915 was 4ebb4862, checked in by Joel Sherrill <joel.sherrill@…>, on 08/01/98 at 15:49:38

Removed all node and menu information since this information is now
automatically generated.

Removed any attempts to link across chapter boundaries since the manual
is incomplete.

  • 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
63@section Directives
64
65This section details the scheduler manager's directives.
66A subsection is dedicated to each of this manager's directives
67and describes the calling sequence, related constants, usage,
68and status codes.
69
70@page
71@subsection sched_get_priority_min
72
73@subheading CALLING SEQUENCE:
74
75@example
76#include <sched.h>
77
78int sched_get_priority_min(
79  int policy
80);
81@end example
82
83@subheading STATUS CODES:
84
85On error, this routine returns -1 and sets errno to one of the following:
86
87@table @b
88@item EINVAL
89The indicated policy is invalid.
90 
91@end table
92
93@subheading DESCRIPTION:
94
95@subheading NOTES:
96
97@page
98@subsection sched_get_priority_max
99
100@subheading CALLING SEQUENCE:
101
102@example
103#include <sched.h>
104
105int sched_get_priority_max(
106  int policy
107);
108@end example
109
110@subheading STATUS CODES:
111
112On error, this routine returns -1 and sets errno to one of the following:
113
114@table @b
115@item EINVAL
116The indicated policy is invalid.
117 
118@end table
119
120@subheading DESCRIPTION:
121
122@subheading NOTES:
123
124@page
125@subsection sched_rr_get_interval
126
127@subheading CALLING SEQUENCE:
128
129@example
130#include <sched.h>
131
132int sched_rr_get_interval(
133  pid_t            pid,
134  struct timespec *interval
135);
136@end example
137
138@subheading STATUS CODES:
139
140On error, this routine returns -1 and sets errno to one of the following:
141
142@table @b
143@item ESRCH
144The indicated process id is invalid.
145 
146@item EINVAL
147The specified interval pointer parameter is invalid.
148
149@end table
150
151@subheading DESCRIPTION:
152
153@subheading NOTES:
154
155@page
156@subsection sched_yield
157
158@subheading CALLING SEQUENCE:
159
160@example
161#include <sched.h>
162
163int sched_yield( void );
164@end example
165
166@subheading STATUS CODES:
167
168This routine always returns zero to indicate success.
169
170@subheading DESCRIPTION:
171
172@subheading NOTES:
173
Note: See TracBrowser for help on using the repository browser.