OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / sched_setparam.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 .\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
30 .\"
31 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
32 .\"         all rights reserved.
33 .\" Translated 1997-02-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
34 .\" Updated & Modified 2005-02-10, Yuichi SATO <ysato444@yahoo.co.jp>
35 .\" Updated & Modified 2005-10-10, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
36 .\" Updated 2006-04-14, Akihiro MOTOKI, LDP v2.29
37 .\"
38 .\"WORD:        process                 ¥×¥í¥»¥¹
39 .\"WORD:        scheduling              ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°
40 .\"WORD:        policy                  Êý¿Ë
41 .\"WORD:        implement               ¼ÂÁõ
42 .\"WORD:        parameter               ¥Ñ¥é¥á¡¼¥¿
43 .\"WORD:        effective user ID       ¼Â¸ú¥æ¡¼¥¶¡¼ID
44 .\"
45 .TH SCHED_SETPARAM 2 2006-03-23 "Linux" "Linux Programmer's Manual"
46 .\"O .SH NAME
47 .SH Ì¾Á°
48 .\"O sched_setparam, sched_getparam \- set and get scheduling parameters
49 sched_setparam, sched_getparam \- ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¡¦¥Ñ¥é¥á¡¼¥¿¤ÎÀßÄê¤È¼èÆÀ¤ò¹Ô¤Ê¤¦
50 .\"O .SH SYNOPSIS
51 .SH ½ñ¼°
52 .nf
53 .B #include <sched.h>
54 .sp
55 .BI "int sched_setparam(pid_t " pid ", const struct sched_param *" param );
56 .sp
57 .BI "int sched_getparam(pid_t " pid ", struct sched_param *" param );
58 .sp
59 .nf
60 .ta 4n
61 \fBstruct sched_param {
62     ...
63     int \fIsched_priority\fB;
64     ...
65 };
66 .fi
67 .\"O .SH DESCRIPTION
68 .SH ÀâÌÀ
69 .\"O .BR sched_setparam ()
70 .\"O sets the scheduling parameters associated with the scheduling policy
71 .\"O for the process identified by \fIpid\fP.
72 .\"O If \fIpid\fP is zero, then
73 .\"O the parameters of the calling process are set.
74 .\"O The interpretation of
75 .\"O the argument \fIparam\fP depends on the scheduling
76 .\"O policy of the process identified by
77 .\"O .IR pid .
78 .\"O See
79 .\"O .BR sched_setscheduler (2)
80 .\"O for a description of the scheduling policies supported under Linux.
81 .BR sched_setparam ()
82 ¤Ï \fIpid\fP ¤Ç»ØÄꤵ¤ì¤¿¥×¥í¥»¥¹¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Êý¿Ë (scheduling policy) ¤Ë
83 ´ØÏ¢¤¹¤ë¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¡¦¥Ñ¥é¥á¡¼¥¿¤òÀßÄꤹ¤ë¡£
84 \fIpid\fP ¤¬ 0 ¤Ê¤é¤Ð¡¢¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤Î¥Ñ¥é¥á¡¼¥¿¤¬ÀßÄꤵ¤ì¤ë¡£
85 °ú¤­¿ô \fIparam\fP ¤Î²ò¼á¤Ï¡¢
86 .I pid
87 ¤Ç»ØÄꤵ¤ì¤¿¥×¥í¥»¥¹¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Êý¿Ë¤Ë¤è¤Ã¤Æ°Û¤Ê¤ë¡£
88 Linux ¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Êý¿Ë¤ÎÀâÌÀ¤Ï
89 .BR sched_setscheduler (2)
90 ¤ò»²¾È¤Î¤³¤È¡£
91
92 .\"O .BR sched_getparam ()
93 .\"O retrieves the scheduling parameters for the
94 .\"O process identified by \fIpid\fP.
95 .\"O If \fIpid\fP is zero, then the parameters
96 .\"O of the calling process are retrieved.
97 .BR sched_getparam ()
98 ¤Ï \fIpid\fP ¤Ç»ØÄꤵ¤ì¤¿¥×¥í¥»¥¹¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¡¦¥Ñ¥é¥á¡¼¥¿¤ò¼èÆÀ¤¹¤ë¡£
99 \fIpid\fP ¤¬ 0 ¤Ê¤é¤Ð¡¢¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤Î¥Ñ¥é¥á¡¼¥¿¤ò¼èÆÀ¤¹¤ë¡£
100
101 .\"O .BR sched_setparam ()
102 .\"O checks the validity of \fIparam\fP for the scheduling policy of the
103 .\"O process.
104 .\"O The value \fIparam\->sched_priority\fP must lie within the
105 .\"O range given by
106 .\"O .BR sched_get_priority_min (2)
107 .\"O and
108 .\"O .BR sched_get_priority_max (2).
109 .BR sched_setparam ()
110 ¤Ï¥×¥í¥»¥¹¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Êý¿Ë¤Ë¤ª¤±¤ë \fIparam\fP ¤ÎÂÅÅöÀ­¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
111 \fIparam\->sched_priority\fP ¤ÎÃͤÏ
112 .BR sched_get_priority_min (2)
113 ¤È
114 .BR sched_get_priority_max (2)
115 ¤ÎÈϰϤËÆþ¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
116
117 .\"O For a discussion of the privileges and resource limits related to
118 .\"O scheduling priority and policy, see
119 .\"O .BR sched_setscheduler (2).
120 ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¤ÎÍ¥ÀèÅÙ¤ÈÊý¿Ë¤Ë´ØÏ¢¤¹¤ëÆø¢¤È¥ê¥½¡¼¥¹À©¸Â¤Î
121 µÄÏÀ¤Ë´Ø¤·¤Æ¤Ï
122 .BR sched_setscheduler (2)
123 ¤ò»²¾È¤Î¤³¤È¡£
124
125 .\"O POSIX systems on which
126 .\"O .BR sched_setparam ()
127 .\"O and
128 .\"O .BR sched_getparam ()
129 .\"O are available define
130 .\"O .B _POSIX_PRIORITY_SCHEDULING
131 .\"O in \fI<unistd.h>\fP.
132 .BR sched_setparam ()
133 ¤È
134 .BR sched_getparam ()
135 ¤¬»ÈÍѤǤ­¤ë POSIX ¥·¥¹¥Æ¥à¤Ç¤Ï¡¢
136 .I <unistd.h>
137 ¤Ë
138 .B _POSIX_PRIORITY_SCHEDULING
139 ¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
140 .\"O .SH "RETURN VALUE"
141 .SH ÊÖ¤êÃÍ
142 .\"O On success,
143 .\"O .BR sched_setparam ()
144 .\"O and
145 .\"O .BR sched_getparam ()
146 .\"O return 0.
147 À®¸ù¤·¤¿¾ì¹ç¤Ï
148 .BR sched_setparam ()
149 ¤È
150 .BR sched_getparam ()
151 ¤Ï 0 ¤òÊÖ¤¹¡£
152 .\"O On error, \-1 is returned, and
153 .\"O .I errno
154 .\"O is set appropriately.
155 ¥¨¥é¡¼¤Î¾ì¹ç¤Ï \-1 ¤¬ÊÖ¤µ¤ì¡¢
156 .I errno
157 ¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
158 .\"O .SH ERRORS
159 .SH ¥¨¥é¡¼
160 .TP
161 .B EINVAL
162 .\"O The argument \fIparam\fP does not make sense for the current
163 .\"O scheduling policy.
164 °ú¤­¿ô \fIparam\fP ¤¬¸½ºß¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Êý¿Ë¤Ë¤ª¤¤¤Æ¤Ï
165 ̵°ÕÌ£¤Ç¤¢¤ë¡£
166 .TP
167 .B EPERM
168 .\"O The calling process does not have appropriate privileges
169 .\"O (Linux: does not have the
170 .\"O .B CAP_SYS_NICE
171 .\"O capability).
172 ¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤¬Å¬ÀÚ¤ÊÆø¢¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤
173 (Linux ¤Ç¤Ï¡¢
174 .B CAP_SYS_NICE
175 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤)¡£
176 .TP
177 .B ESRCH
178 .\"O The process whose ID is \fIpid\fP could not be found.
179 \fIpid\fP ¤ò ID ¤Ë»ý¤Ä¥×¥í¥»¥¹¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¡£
180 .\"O .SH "CONFORMING TO"
181 .SH ½àµò
182 POSIX.1-2001.
183 .\"O .SH "SEE ALSO"
184 .SH ´ØÏ¢¹àÌÜ
185 .BR getpriority (2),
186 .BR nice (2),
187 .BR sched_get_priority_max (2),
188 .BR sched_get_priority_min (2),
189 .BR sched_getaffinity (2),
190 .BR sched_getscheduler (2),
191 .BR sched_setaffinity (2),
192 .BR sched_setscheduler (2),
193 .BR setpriority (2),
194 .BR capabilities (7)
195 .PP
196 .I Programming for the real world \- POSIX.4
197 by Bill O. Gallmeister, O'Reilly & Associates, Inc., ISBN 1-56592-074-0