OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / draft / man2 / sched_get_priority_max.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (C) Tom Bjorkholm & Markus Kuhn, 1996
4 .\"
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, write to the Free
22 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
23 .\" USA.
24 .\"
25 .\" 1996-04-01 Tom Bjorkholm <tomb@mydata.se>
26 .\"            First version written
27 .\" 1996-04-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
28 .\"            revision
29 .\"
30 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
31 .\"         all rights reserved.
32 .\" Translated 1997-02-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
33 .\" Updated 2006-04-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.29
34 .\"
35 .\"WORD:        static                  ÀÅŪ
36 .\"WORD:        priority                ¥×¥é¥¤¥ª¥ê¥Æ¥£
37 .\"WORD:        scheduling              ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°
38 .\"WORD:        algorithm               ¥¢¥ë¥´¥ê¥º¥à
39 .\"WORD:        process                 ¥×¥í¥»¥¹
40 .\"WORD:        portable                °Ü¿¢À­¤Î¤¢¤ë
41 .\"WORD:        policy                  Êý¿Ë
42 .\"
43 .TH SCHED_GET_PRIORITY_MAX 2 2006-03-23 "Linux" "Linux Programmer's Manual"
44 .\"O .SH NAME
45 .SH Ì¾Á°
46 .\"O sched_get_priority_max, sched_get_priority_min  \- get static priority range
47 sched_get_priority_max, sched_get_priority_min  \- ÀÅŪ¥×¥é¥¤¥ª¥ê¥Æ¥£¤ÎÈϰϤò¼èÆÀ¤¹¤ë
48 .\"O .SH SYNOPSIS
49 .SH ½ñ¼°
50 .B #include <sched.h>
51 .sp
52 .BI "int sched_get_priority_max(int " policy );
53 .sp
54 .BI "int sched_get_priority_min(int " policy );
55 .\"O .SH DESCRIPTION
56 .SH ÀâÌÀ
57 .\"O .BR sched_get_priority_max ()
58 .\"O returns the maximum priority value that can be used with the
59 .\"O scheduling algorithm identified by \fIpolicy\fP.
60 .\"O .BR sched_get_priority_min ()
61 .\"O returns the minimum priority value that can be used with the
62 .\"O scheduling algorithm identified by \fIpolicy\fP.
63 .\"O Supported \fIpolicy\fP
64 .\"O values are
65 .\"O .BR SCHED_FIFO ,
66 .\"O .BR SCHED_RR ,
67 .\"O .BR SCHED_OTHER ,
68 .\"O and
69 .\"O .BR SCHED_BATCH .
70 .\"O Further details about these policies can be found in
71 .\"O .BR sched_setscheduler (2).
72 .BR sched_get_priority_max ()
73 ¤Ï\fIpolicy\fP ¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤¿¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¤Î¥¢¥ë¥´¥ê¥º¥à¤Ç
74 »ÈÍѤµ¤ì¤ë¥×¥é¥¤¥ª¥ê¥Æ¥£¤ÎºÇÂçÃͤòÊÖ¤¹¡£
75 .BR sched_get_priority_min ()
76 ¤Ï\fIpolicy\fP ¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤¿¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¤Î¥¢¥ë¥´¥ê¥º¥à¤Ç
77 »ÈÍѤµ¤ì¤ë¥×¥é¥¤¥ª¥ê¥Æ¥£¤ÎºÇ¾®ÃͤòÊÖ¤¹¡£
78 ¥µ¥Ý¡¼¥È¤µ¤ì¤ë \fIpolicy\fP ¤ÎÃͤÏ
79 .BR SCHED_FIFO ¡¢
80 .BR SCHED_RR ¡¢
81 .BR SCHED_OTHER ¡¢
82 .B SCHED_BATCH
83 ¤Ç¤¢¤ë¡£¤³¤ì¤é¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Êý¿Ë¤Ë´Ø¤¹¤ë¾ÜºÙ¤Ï
84 .BR sched_setscheduler (2)
85 ¤Ë½ñ¤«¤ì¤Æ¤¤¤ë¡£
86
87 .\"O Processes with numerically higher priority values are scheduled before
88 .\"O processes with numerically lower priority values.
89 .\"O Thus, the value
90 .\"O returned by
91 .\"O .BR sched_get_priority_max ()
92 .\"O will be greater than the
93 .\"O value returned by
94 .\"O .BR sched_get_priority_min ().
95 ¿ôÃÍŪ¤ËÂ礭¤Ê¥×¥é¥¤¥ª¥ê¥Æ¥£Ãͤò»ý¤Ä¥×¥í¥»¥¹¤Ï¾®¤µ¤Ê
96 ¥×¥é¥¤¥ª¥ê¥Æ¥£Ãͤò»ý¤Ä¥×¥í¥»¥¹¤è¤êÁ°¤Ë¥¹¥±¥¸¥å¡¼¥ë¤µ¤ì¤ë¡£
97 ¤³¤Î¤¿¤á
98 .BR sched_get_priority_max ()
99 ¤¬ÊÖ¤¹ÃͤÏ
100 .BR sched_get_priority_min ()
101 ¤¬ÊÖ¤¹Ãͤè¤ê¤âÂ礭¤¤¡£
102
103 .\"O Linux allows the static priority value range 1 to 99 for
104 .\"O \fBSCHED_FIFO\fP and \fBSCHED_RR\fP and the priority 0 for
105 .\"O \fBSCHED_OTHER\fP and \fBSCHED_BATCH\fP.
106 .\"O Scheduling priority ranges for the various policies
107 .\"O are not alterable.
108 Linux ¤Ç¤Ï \fBSCHED_FIFO\fP ¤È \fBSCHED_RR\fP ¤Ç¤Ï 1 ¤«¤é 99 ¤ÎÈϰϤÎ
109 ÀÅŪ¥×¥é¥¤¥ª¥ê¥Æ¥£¡¼¤ò»ý¤Á¡¢\fBSCHED_OTHER\fP ¤È \fBSCHED_BATCH\fP ¤Ç¤Ï
110 ¥×¥é¥¤¥ª¥ê¥Æ¥£¤È¤·¤Æ 0 ¤ò»ý¤Ä¡£
111 ¤½¤ì¤¾¤ì¤ÎÊý¿Ë¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¡¦¥×¥é¥¤¥ª¥ê¥Æ¥£¤ÎÈϰϤÏ
112 Êѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¡£
113
114 .\"O The range of scheduling priorities may vary on other POSIX systems,
115 .\"O thus it is a good idea for portable applications to use a virtual
116 .\"O priority range and map it to the interval given by
117 .\"O .BR sched_get_priority_max ()
118 .\"O and
119 .\"O .BR sched_get_priority_min ().
120 .\"O POSIX.1-2001 requires a spread of at least 32 between the maximum and the
121 .\"O minimum values for \fBSCHED_FIFO\fP and \fBSCHED_RR\fP.
122 ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¡¦¥×¥é¥¤¥ª¥ê¥Æ¥£¤ÎÈϰϤϾ¤Î POSIX ¥·¥¹¥Æ¥à¤È
123 °Û¤Ê¤Ã¤Æ¤¤¤ë¤«¤â¤·¤ì¤Ê¤¤¡£¤½¤ì¤Ç¡¢°Ü¿¢À­(portable)¤Î¤¢¤ë
124 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤Ï²¾ÁÛŪ¤ÊÈϰϤòÍѤ¤
125 .BR sched_get_priority_max ()
126 ¤È
127 .BR sched_get_priority_min ()
128 ¤ÇÍ¿¤¨¤é¤ì¤¿´Ö³Ö¤Ë¥Þ¥Ã¥×¤·¤Æ»ÈÍѤ¹¤ë¤³¤È¤Ï¤¤¤¤¹Í¤¨¤Ç¤¢¤ë¡£
129 POSIX.1-2001 ¤Ç¤Ï \fBSCHED_FIFO\fP ¤È \fBSCHED_RR\fP ¤Ë¤ª¤±¤ë
130 ºÇÂçÃͤȺǾ®Ãͤδֳ֤ò¾¯¤Ê¤¯¤È¤â 32 ¤Ë¤¹¤ë¤³¤È¤òÍ׵ᤷ¤Æ¤¤¤ë¡£
131
132 .\"O POSIX systems on which
133 .\"O .BR sched_get_priority_max ()
134 .\"O and
135 .\"O .BR sched_get_priority_min ()
136 .\"O are available define
137 .\"O .B _POSIX_PRIORITY_SCHEDULING
138 .\"O in \fI<unistd.h>\fP.
139 POSIX ¥·¥¹¥Æ¥à¤Ç¤Ï
140 .BR sched_get_priority_max ()
141 ¤È
142 .BR sched_get_priority_min ()
143 ¤Ï \fI<unistd.h>\fP ¤Ë
144 .B _POSIX_PRIORITY_SCHEDULING
145 ¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Î¤ß»ÈÍѲÄǽ¤Ç¤¢¤ë¡£
146 .\"O .SH "RETURN VALUE"
147 .SH ÊÖ¤êÃÍ
148 .\"O On success,
149 .\"O .BR sched_get_priority_max ()
150 .\"O and
151 .\"O .BR sched_get_priority_min ()
152 .\"O return the maximum/minimum priority value for the named scheduling
153 .\"O policy.
154 .\"O On error, \-1 is returned, and
155 .\"O .I errno
156 .\"O is set appropriately.
157 À®¸ù¤·¤¿¾ì¹ç¤Ï
158 .BR sched_get_priority_max ()
159 ¤È
160 .BR sched_get_priority_min ()
161 ¤Ï»ØÄꤵ¤ì¤¿¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Êý¿Ë¤Î¥×¥é¥¤¥ª¥ê¥Æ¥£¤ÎºÇÂçÃÍ/ºÇ¾®ÃͤòÊÖ¤¹¡£
162 ¥¨¥é¡¼¤Î¾ì¹ç¤Ï \-1 ¤¬ÊÖ¤µ¤ì¡¢
163 .I errno
164 ¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
165 .\"O .SH ERRORS
166 .SH ¥¨¥é¡¼
167 .TP
168 .B EINVAL
169 .\"O The argument \fIpolicy\fP does not identify a defined scheduling policy.
170 °ú¤­¿ô \fIpolicy\fP ¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Êý¿Ë¤È°ìÃפ·¤Ê¤¤¡£
171 .\"O .SH "CONFORMING TO"
172 .SH ½àµò
173 POSIX.1-2001.
174 .\"O .SH "SEE ALSO"
175 .SH ´ØÏ¢¹àÌÜ
176 .BR sched_getaffinity (2),
177 .BR sched_getparam (2)
178 .BR sched_getscheduler (2),
179 .BR sched_setaffinity (2),
180 .BR sched_setparam (2),
181 .BR sched_setscheduler (2),
182 .PP
183 .I Programming for the real world \- POSIX.4
184 by Bill O. Gallmeister, O'Reilly & Associates, Inc., ISBN 1-56592-074-0