logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

sched.h.0p (4470B)


  1. '\" et
  2. .TH sched.h "0P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. sched.h
  12. \(em execution scheduling
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <sched.h>
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR <sched.h>
  21. header shall define the
  22. .BR pid_t
  23. type as described in
  24. .IR <sys/types.h> .
  25. .P
  26. The
  27. .IR <sched.h>
  28. header shall define the
  29. .BR time_t
  30. type as described in
  31. .IR <sys/types.h> .
  32. .P
  33. The
  34. .IR <sched.h>
  35. header shall define the
  36. .BR timespec
  37. structure as described in
  38. .IR <time.h> .
  39. .P
  40. The
  41. .IR <sched.h>
  42. header shall define the
  43. .BR sched_param
  44. structure, which shall include the scheduling parameters required for
  45. implementation of each supported scheduling policy. This structure
  46. shall include at least the following member:
  47. .sp
  48. .RS 4
  49. .nf
  50. int sched_priority \fRProcess or thread execution scheduling priority.\fP
  51. .fi
  52. .P
  53. .RE
  54. .P
  55. The
  56. .BR sched_param
  57. structure defined in
  58. .IR <sched.h>
  59. shall include the following members in addition to those specified
  60. above:
  61. .sp
  62. .RS 4
  63. .nf
  64. int sched_ss_low_priority \fRLow scheduling priority for\fR
  65. \fRsporadic server.\fR
  66. struct timespec sched_ss_repl_period \fRReplenishment period for\fR
  67. \fRsporadic server.\fR
  68. struct timespec sched_ss_init_budget \fRInitial budget for sporadic server.\fR
  69. int sched_ss_max_repl \fRMaximum pending replenishments for\fR
  70. \fRsporadic server.\fR
  71. .fi
  72. .P
  73. .RE
  74. .P
  75. Each process or thread is controlled by an associated scheduling policy
  76. and priority. Associated with each policy is a priority range. Each
  77. policy definition specifies the minimum priority range for that
  78. policy. The priority ranges for each policy may overlap the priority
  79. ranges of other policies.
  80. .P
  81. Four scheduling policies are defined; others may be defined by the
  82. implementation. The four standard policies are indicated by the
  83. values of the following symbolic constants:
  84. .IP SCHED_FIFO 14
  85. First in-first out (FIFO) scheduling policy.
  86. .IP SCHED_RR 14
  87. Round robin scheduling policy.
  88. .IP SCHED_SPORADIC 14
  89. Sporadic server scheduling policy.
  90. .IP SCHED_OTHER 14
  91. Another scheduling policy.
  92. .P
  93. The values of these constants are distinct.
  94. .P
  95. The following shall be declared as functions and may also be defined
  96. as macros. Function prototypes shall be provided.
  97. .sp
  98. .RS 4
  99. .nf
  100. int sched_get_priority_max(int);
  101. int sched_get_priority_min(int);
  102. int sched_getparam(pid_t, struct sched_param *);
  103. int sched_getscheduler(pid_t);
  104. int sched_rr_get_interval(pid_t, struct timespec *);
  105. int sched_setparam(pid_t, const struct sched_param *);
  106. int sched_setscheduler(pid_t, int, const struct sched_param *);
  107. int sched_yield(void);
  108. .fi
  109. .P
  110. .RE
  111. .P
  112. Inclusion of the
  113. .IR <sched.h>
  114. header may make visible all symbols from the
  115. .IR <time.h>
  116. header.
  117. .LP
  118. .IR "The following sections are informative."
  119. .SH "APPLICATION USAGE"
  120. None.
  121. .SH RATIONALE
  122. None.
  123. .SH "FUTURE DIRECTIONS"
  124. None.
  125. .SH "SEE ALSO"
  126. .IR "\fB<sys_types.h>\fP",
  127. .IR "\fB<time.h>\fP"
  128. .P
  129. The System Interfaces volume of POSIX.1\(hy2017,
  130. .IR "\fIsched_get_priority_max\fR\^(\|)",
  131. .IR "\fIsched_getparam\fR\^(\|)",
  132. .IR "\fIsched_getscheduler\fR\^(\|)",
  133. .IR "\fIsched_rr_get_interval\fR\^(\|)",
  134. .IR "\fIsched_setparam\fR\^(\|)",
  135. .IR "\fIsched_setscheduler\fR\^(\|)",
  136. .IR "\fIsched_yield\fR\^(\|)"
  137. .\"
  138. .SH COPYRIGHT
  139. Portions of this text are reprinted and reproduced in electronic form
  140. from IEEE Std 1003.1-2017, Standard for Information Technology
  141. -- Portable Operating System Interface (POSIX), The Open Group Base
  142. Specifications Issue 7, 2018 Edition,
  143. Copyright (C) 2018 by the Institute of
  144. Electrical and Electronics Engineers, Inc and The Open Group.
  145. In the event of any discrepancy between this version and the original IEEE and
  146. The Open Group Standard, the original IEEE and The Open Group Standard
  147. is the referee document. The original Standard can be obtained online at
  148. http://www.opengroup.org/unix/online.html .
  149. .PP
  150. Any typographical or formatting errors that appear
  151. in this page are most likely
  152. to have been introduced during the conversion of the source files to
  153. man page format. To report such errors, see
  154. https://www.kernel.org/doc/man-pages/reporting_bugs.html .