1<sched.h>(0P)              POSIX Programmer's Manual             <sched.h>(0P)
2
3
4

NAME

6       sched.h - execution scheduling (REALTIME)
7

SYNOPSIS

9       #include <sched.h>
10

DESCRIPTION

12       The <sched.h> header shall define the sched_param structure, which con‐
13       tains the scheduling parameters required  for  implementation  of  each
14       supported  scheduling policy. This structure shall contain at least the
15       following member:
16
17
18              int       sched_priority        Process execution scheduling priority.
19
20       In addition, if _POSIX_SPORADIC_SERVER or _POSIX_THREAD_SPORADIC_SERVER
21       is  defined,  the sched_param structure defined in <sched.h> shall con‐
22       tain the following members in addition to those specified above:
23
24
25              int             sched_ss_low_priority Low scheduling priority for
26                                                    sporadic server.
27              struct timespec sched_ss_repl_period  Replenishment period for
28                                                    sporadic server.
29              struct timespec sched_ss_init_budget  Initial budget for sporadic server.
30              int             sched_ss_max_repl     Maximum pending replenishments for
31                                                    sporadic server.
32
33       Each process is controlled by an associated scheduling policy and  pri‐
34       ority.  Associated  with  each policy is a priority range.  Each policy
35       definition specifies the minimum priority range for  that  policy.  The
36       priority  ranges  for  each  policy  may overlap the priority ranges of
37       other policies.
38
39       Four scheduling policies are defined; others  may  be  defined  by  the
40       implementation.  The four standard policies are indicated by the values
41       of the following symbolic constants:
42
43       SCHED_FIFO
44              First in-first out (FIFO) scheduling policy.
45
46       SCHED_RR
47              Round robin scheduling policy.
48
49       SCHED_SPORADIC
50              Sporadic server scheduling policy.
51
52       SCHED_OTHER
53              Another scheduling policy.
54
55
56       The values of these constants are distinct.
57
58       The following shall be declared as functions and may also be defined as
59       macros. Function prototypes shall be provided.
60
61
62              int    sched_get_priority_max(int);
63              int    sched_get_priority_min(int);
64
65              int    sched_getparam(pid_t, struct sched_param *);
66              int    sched_getscheduler(pid_t);
67
68              int    sched_rr_get_interval(pid_t, struct timespec *);
69
70              int    sched_setparam(pid_t, const struct sched_param *);
71              int    sched_setscheduler(pid_t, int, const struct sched_param *);
72
73              int    sched_yield(void);
74
75
76
77       Inclusion of the <sched.h> header may make visible all symbols from the
78       <time.h> header.
79
80       The following sections are informative.
81

APPLICATION USAGE

83       None.
84

RATIONALE

86       None.
87

FUTURE DIRECTIONS

89       None.
90

SEE ALSO

92       <time.h>
93
95       Portions of this text are reprinted and reproduced in  electronic  form
96       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
97       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
98       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
99       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
100       event of any discrepancy between this version and the original IEEE and
101       The Open Group Standard, the original IEEE and The Open Group  Standard
102       is  the  referee document. The original Standard can be obtained online
103       at http://www.opengroup.org/unix/online.html .
104
105
106
107IEEE/The Open Group                  2003                        <sched.h>(0P)
Impressum