OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / getpriority.2
1 .\" Copyright (c) 1980, 1991 The Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)getpriority.2       6.9 (Berkeley) 3/10/91
33 .\"
34 .\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
35 .\" Modified 1996-07-01 by Andries Brouwer <aeb@cwi.nl>
36 .\" Modified 1996-11-06 by Eric S. Raymond <esr@thyrsus.com>
37 .\" Modified 2001-10-21 by Michael Kerrisk <mtk.manpages@gmail.com>
38 .\"    Corrected statement under EPERM to clarify privileges required
39 .\" Modified 2002-06-21 by Michael Kerrisk <mtk.manpages@gmail.com>
40 .\"    Clarified meaning of 0 value for 'who' argument
41 .\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
42 .\"
43 .\" FIXME Oct 2008: Denys Vlasenko is working on a PRIO_THREAD feature that
44 .\" is likely to get included in mainline; this will need to be documented.
45 .\"
46 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
47 .\"         all rights reserved.
48 .\" Translated 1997-02-22, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
49 .\" Modified 2001-08-17, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
50 .\" Modified 2001-10-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
51 .\" Updated 2001-12-13, Kentaro Shirakata <argrath@ub32.org>
52 .\" Updated 2002-10-16, Kentaro Shirakata <argrath@ub32.org>
53 .\" Updated 2005-02-24, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
54 .\" Updated 2005-10-07, Akihiro MOTOKI
55 .\" Updated 2008-08-04, Akihiro MOTOKI, LDP v3.05
56 .\"
57 .\"WORD:        scheduling              ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°
58 .\"WORD:        piority                 Í¥ÀèÅÙ
59 .\"WORD:        call                    ¥³¡¼¥ë
60 .\"WORD:        user-ID                 UID
61 .\"WORD:        process                 ¥×¥í¥»¥¹
62 .\"WORD:        user                    ¥æ¡¼¥¶¡¼
63 .\"WORD:        super user              ¥¹¡¼¥Ñ¡¼¡¦¥æ¡¼¥¶¡¼
64 .\"WORD:        effective user-ID       ¼Â¸úUID
65 .\"WORD:        real user-ID            ¼ÂUID
66 .\"
67 .TH GETPRIORITY 2 2008-05-29 "Linux" "Linux Programmer's Manual"
68 .\"O .SH NAME
69 .SH Ì¾Á°
70 .\"O getpriority, setpriority \- get/set program scheduling priority
71 getpriority, setpriority \- ¥×¥í¥°¥é¥à¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¤ÎÍ¥ÀèÅÙ¤ò¼èÆÀ/ÀßÄꤹ¤ë
72 .\"O .SH SYNOPSIS
73 .SH ½ñ¼°
74 .B #include <sys/time.h>
75 .br
76 .B #include <sys/resource.h>
77 .sp
78 .BI "int getpriority(int " which ", int " who );
79 .br
80 .BI "int setpriority(int " which ", int " who ", int " prio );
81 .\"O .SH DESCRIPTION
82 .SH ÀâÌÀ
83 .\"O The scheduling priority of the process, process group, or user, as
84 .\"O indicated by
85 .\"O .I which
86 .\"O and
87 .\"O .I who
88 .\"O is obtained with the
89 .\"O .BR getpriority ()
90 .\"O call and set with the
91 .\"O .BR setpriority ()
92 .\"O call.
93 ¥·¥¹¥Æ¥à¥³¡¼¥ë
94 .BR getpriority ()
95 ¤ä
96 .BR setpriority ()
97 ¤Ï¡¢
98 .I which
99 ¤È
100 .I who
101 ¤Ç»ØÄꤵ¤ì¤¿¥×¥í¥»¥¹¡¢¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¡¢¥æ¡¼¥¶¡¼¤Î
102 ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Í¥ÀèÅÙ (scheduling priority) ¤Î
103 ¼èÆÀ¤äÀßÄê¤ò¤½¤ì¤¾¤ì¹Ô¤¦¡£
104
105 .\"O The value
106 .\"O .I which
107 .\"O is one of
108 .\"O .BR PRIO_PROCESS ,
109 .\"O .BR PRIO_PGRP ,
110 .\"O or
111 .\"O .BR PRIO_USER ,
112 .\"O and
113 .\"O .I who
114 .\"O is interpreted relative to
115 .\"O .I which
116 .\"O (a process identifier for
117 .\"O .BR PRIO_PROCESS ,
118 .\"O process group
119 .\"O identifier for
120 .\"O .BR PRIO_PGRP ,
121 .\"O and a user ID for
122 .\"O .BR PRIO_USER ).
123 .I which
124 ¤ÎÃͤÏ
125 .BR PRIO_PROCESS ,
126 .BR PRIO_PGRP ,
127 .BR PRIO_USER ,
128 ¤Î¤É¤ì¤«°ì¤Ä¤Ç¡¢
129 .I who
130 ¤Ï
131 .I which
132 ¤Ë±þ¤¸¤Æ²ò¼á¤µ¤ì¤ë
133 .RB ( PRIO_PROCESS
134 ¤À¤È¥×¥í¥»¥¹¼±Ê̻ҡ¢
135 .B PRIO_PGRP
136 ¤À¤È¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¼±Ê̻ҡ¢
137 .B PRIO_USER
138 ¤À¤È UID (¥æ¡¼¥¶ID) ¤È²ò¼á¤µ¤ì¤ë)¡£
139 .\"O A zero value for
140 .\"O .I who
141 .\"O denotes (respectively) the calling process, the process group of the
142 .\"O calling process, or the real user ID of the calling process.
143 .I who
144 ¤¬¥¼¥í¤Ê¤é¤Ð¡¢(¤½¤ì¤¾¤ì)¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¡¢
145 ¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¡¢
146 ¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î¼ÂUID ¤ò°ÕÌ£¤¹¤ë¡£
147 .\"O .I Prio
148 .\"O is a value in the range \-20 to 19 (but see the Notes below).
149 .\"O The default priority is 0;
150 .\"O lower priorities cause more favorable scheduling.
151 .I prio
152 ¤Ï \-20 ¤«¤é 19 ¤ÎÈϰϤÎÃͤǠ(⤷°Ê²¼¤ÎÃí°Õ¤Î¹à¤ò»²¾È¤Î¤³¤È)¡¢
153 ¥Ç¥Õ¥©¥ë¥È¤ÎÍ¥ÀèÅ٤Ϡ0 ¤Ç¤¢¤ë;
154 ¾®¤µ¤Ê¿ô»ú¤Û¤É¡¢Í­Íø¤Ê¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¤È¤Ê¤ë¡£
155
156 .\"O The
157 .\"O .BR getpriority ()
158 .\"O call returns the highest priority (lowest numerical value)
159 .\"O enjoyed by any of the specified processes.
160 .\"O The
161 .\"O .BR setpriority ()
162 .\"O call sets the priorities of all of the specified processes
163 .\"O to the specified value.
164 .\"O Only the superuser may lower priorities.
165 .BR getpriority ()
166 ¥³¡¼¥ë¤Ï»ØÄꤷ¤¿¥×¥í¥»¥¹¤ÎÃæ¤ÎºÇ¤â¹â¤¤Í¥ÀèÅÙ (¿ôÃÍŪ¤Ë¤ÏºÇ¾®¤ÎÃÍ) ¤òÊÖ¤¹¡£
167 .BR setpriority ()
168 ¥³¡¼¥ë¤Ï»ØÄꤷ¤¿¥×¥í¥»¥¹Á´¤Æ¤ÎÍ¥ÀèÅÙ¤ò»ØÄꤷ¤¿ÃͤËÀßÄꤹ¤ë¡£
169 Í¥ÀèÅÙ¤òº£¤è¤ê¾®¤µ¤¤ÃͤËÀßÄê¤Ç¤­¤ë¤Î¤Ï¥¹¡¼¥Ñ¡¼¡¦¥æ¡¼¥¶¡¼¤À¤±¤Ç¤¢¤ë¡£
170 .\"O .SH "RETURN VALUE"
171 .SH ÊÖ¤êÃÍ
172 .\"O Since
173 .\"O .BR getpriority ()
174 .\"O can legitimately return the value \-1, it is necessary
175 .\"O to clear the external variable
176 .\"O .I errno
177 .\"O prior to the
178 .\"O call, then check it afterwards to determine
179 .\"O if \-1 is an error or a legitimate value.
180 .\"O The
181 .\"O .BR setpriority ()
182 .\"O call returns 0 if there is no error, or
183 .\"O \-1 if there is.
184 .BR getpriority ()
185 ¤ÏÀ®¸ù¤·¤¿¾ì¹ç¤Ë¤â \-1 ¤ÎÃͤòÊÖ¤¹²ÄǽÀ­¤¬¤¢¤ë¤Î¤Ç¡¢
186 ¸Æ¤Ó½Ð¤·¤ÎÁ°¤Ë³°ÉôÊÑ¿ô¤Î
187 .I errno
188 ¤ò¥¯¥ê¥¢¤·¡¢¸Æ¤Ó½Ð¤·¤Î¸å¤ËÊÖ¤êÃͤΠ\-1 ¤¬ÀµÅö¤ÊÃͤ«
189 ¥¨¥é¡¼¤«¤òȽÊ̤¹¤ëɬÍפ¬¤¢¤ë¡£
190 .BR setpriority ()
191 ¥³¡¼¥ë¤Ï¥¨¥é¡¼¤¬¤Ê¤±¤ì¤Ð 0 ¤òÊÖ¤·¡¢¥¨¥é¡¼¤¬¤¢¤ì¤Ð \-1 ¤òÊÖ¤¹¡£
192
193 .\"O .SH ERRORS
194 .SH ¥¨¥é¡¼
195 .TP
196 .B EINVAL
197 .\"O .I which
198 .\"O was not one of
199 .\"O .BR PRIO_PROCESS ,
200 .\"O .BR PRIO_PGRP ,
201 .\"O or
202 .\"O .BR PRIO_USER .
203 .I which
204 ¤¬
205 .BR PRIO_PROCESS ,
206 .BR PRIO_PGRP ,
207 .B PRIO_USER
208 ¤Î¤¤¤º¤ì¤Ç¤â¤Ê¤¤¡£
209 .TP
210 .B ESRCH
211 .\"O No process was located using the
212 .\"O .I which
213 .\"O and
214 .\"O .I who
215 .\"O values specified.
216 .I which
217 ¤È
218 .I who
219 ¤Ç»ØÄꤵ¤ì¤¿¥×¥í¥»¥¹¤¬Â¸ºß¤·¤Ê¤¤¡£
220 .PP
221 .\"O In addition to the errors indicated above,
222 .\"O .BR setpriority ()
223 .\"O may fail if:
224 ¾åµ­¤Î¤â¤Î¤Ë²Ã¤¨¤Æ
225 .BR setpriority ()
226 ¤Ç¤Ï°Ê²¼¤Î¥¨¥é¡¼¤¬¤¢¤ë:
227 .TP
228 .B EACCES
229 .\"O The caller attempted to lower a process priority, but did not
230 .\"O have the required privilege (on Linux: did not have the
231 .\"O .B CAP_SYS_NICE
232 .\"O capability).
233 .\"O Since Linux 2.6.12, this error only occurs if the caller attempts
234 .\"O to set a process priority outside the range of the
235 .\"O .B RLIMIT_NICE
236 .\"O soft resource limit of the target process; see
237 .\"O .BR getrlimit (2)
238 .\"O for details.
239 ¸Æ¤Ó½Ð¤·¸µ¤¬¥×¥í¥»¥¹¤ÎÍ¥ÀèÅÙ¤ò²¼¤²¤è¤¦¤È¤·¤¿¤¬¡¢É¬ÍפÊÆø¢¤ò
240 »ý¤Ã¤Æ¤¤¤Ê¤«¤Ã¤¿ (Linux ¤Î¾ì¹ç¡¢
241 .B CAP_SYS_NICE
242 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤¬¤Ê¤«¤Ã¤¿)¡£
243 Linux 2.6.12 °Ê¹ß¤Ç¤Ï¡¢¸Æ¤Ó½Ð¤·¸µ¤¬¡¢¤¢¤ë¥×¥í¥»¥¹¤ÎÍ¥ÀèÅÙ¤ò¡¢
244 Êѹ¹ÂÐ¾Ý¤Î¥×¥í¥»¥¹¤Î¥ê¥½¡¼¥¹
245 .B RLIMIT_NICE
246 ¤Î¥½¥Õ¥È¡¦¥ê¥ß¥Ã¥È¤ÎÈϰϳ°¤ËÀßÄꤷ¤è¤¦¤È¤·¤¿¾ì¹ç¤Ë¤Î¤ß¡¢
247 ¤³¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë¡£¾ÜºÙ¤Ï
248 .BR getrlimit (2)
249 ¤ò»²¾È¡£
250 .TP
251 .B EPERM
252 .\"O A process was located, but its effective user ID did not match
253 .\"O either the effective or the real user ID of the caller,
254 .\"O and was not privileged (on Linux: did not have the
255 .\"O .B CAP_SYS_NICE
256 .\"O capability).
257 .\"O But see NOTES below.
258 ¥×¥í¥»¥¹¤Ï¸«¤Ä¤«¤Ã¤¿¤¬¡¢¤½¤Î¥×¥í¥»¥¹¤Î¼Â¸ú (effective) UID ¤¬
259 ¸Æ¤Ó½Ð¤·¸µ¤Î¼Â¸úUID ¤Ë¤â¼Â (real) UID ¤Ë¤â°ìÃפ»¤º¡¢
260 ¸Æ¤Ó½Ð¤·¸µ¤¬Æø¢¤â»ý¤Ã¤Æ¤¤¤Ê¤«¤Ã¤¿ (Linux ¤Î¾ì¹ç¡¢
261 .B CAP_SYS_NICE
262 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤¬¤Ê¤«¤Ã¤¿)¡£
263 °Ê²¼¤Î¡ÖÃí°Õ¡×¤â»²¾È¤Î¤³¤È¡£
264 .\"O .SH "CONFORMING TO"
265 .SH ½àµò
266 .\"O SVr4, 4.4BSD (these function calls first appeared in 4.2BSD),
267 .\"O POSIX.1-2001.
268 SVr4, 4.4BSD (¤³¤ì¤é¤Î´Ø¿ô¤Ï 4.2BSD ¤ÇºÇ½é¤ËÅо줷¤¿),
269 POSIX.1-2001.
270 .\"O .SH NOTES
271 .SH Ãí°Õ
272 .\"O A child created by
273 .\"O .BR fork (2)
274 .\"O inherits its parent's nice value.
275 .\"O The nice value is preserved across
276 .\"O .BR execve (2).
277 .BR fork (2)
278 ¤ÇºîÀ®¤µ¤ì¤¿»Ò¥×¥í¥»¥¹¤Ï¡¢
279 ¿Æ¥×¥í¥»¥¹¤Î nice Ãͤò·Ñ¾µ¤¹¤ë¡£
280 .BR execve (2)
281 ¤ÎÁ°¸å¤Ç nice ÃͤÏÊݸ¤µ¤ì¤ë¡£
282
283 .\"O The degree to which their relative nice value affects the scheduling of
284 .\"O processes varies across Unix systems, and,
285 .\"O on Linux, across kernel versions.
286 .\"O Starting with kernel 2.6.23, Linux adopted an algorithm that causes
287 .\"O relative differences in nice values to have a much stronger effect.
288 .\"O This causes very low nice values (+19) to truly provide little CPU
289 .\"O to a process whenever there is any other
290 .\"O higher priority load on the system,
291 .\"O and makes high nice values (\-20) deliver most of the CPU to applications
292 .\"O that require it (e.g., some audio applications).
293 ÁêÂÐŪ¤Ê nice Ãͤΰ㤤¤¬¥×¥í¥»¥¹´Ö¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¤Ë¤É¤ÎÄøÅٱƶÁ¤òÍ¿¤¨¤ë¤«
294 ¤Ï¡¢Unix ¥·¥¹¥Æ¥à´Ö¤Ç°Û¤Ê¤ê¡¢Linux ¤Ç¤Ï¥«¡¼¥Í¥ë¥Ð¡¼¥¸¥ç¥ó¤Ë¤è¤ê°Û¤Ê¤ë¡£
295 Linux ¤Ï¡¢¥«¡¼¥Í¥ë 2.6.23 °Ê¹ß¤Ç¡¢nice ÃͤÎÁêÂÐŪ¤Ê°ã¤¤¤¬¡¢Èó¾ï¤Ë¶¯¤¤±Æ¶Á¤ò
296 Í¿¤¨¤ë¥¢¥ë¥´¥ê¥º¥à¤òºÎÍѤ·¤¿¡£¤³¤Î¥¢¥ë¥´¥ê¥º¥à¤Ç¤Ï¡¢
297 ¾¤ËÍ¥ÀèÅ٤ι⤤¤â¤Î¤¬¥·¥¹¥Æ¥à¤Ë¸ºß¤¹¤ë»þ¤Ë¤Ï¡¢
298 Èó¾ï¤ËÄ㤤 nice ÃÍ (+19) ¤Ç¤Ï¥×¥í¥»¥¹¤ËËÜÅö¤Ë¤Û¤È¤ó¤É CPU ¤¬³ä¤êÅö¤Æ¤é¤ì¤Ê¤¤¡£
299 ¤Þ¤¿¡¢¹â¤¤ nice ÃÍ (\-20) ¤Ç¤Ï CPU ¤òɬÍפȤ¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó (Î㤨¤Ð
300 ¥ª¡¼¥Ç¥£¥ª¡¦¥¢¥×¥ê¥±¡¼¥·¥ç¥ó) ¤Ë CPU ¤Î¤Û¤È¤ó¤É¤¬³ä¤êÅö¤Æ¤é¤ì¤ë¡£
301
302 .\"O The details on the condition for
303 .\"O .B EPERM
304 .\"O depend on the system.
305 .B EPERM
306 ¤¬È¯À¸¤¹¤ë¾ò·ï¤Î¾ÜºÙ¤Ï¥·¥¹¥Æ¥à¤Ë°Í¸¤¹¤ë¡£
307 .\"O The above description is what POSIX.1-2001 says, and seems to be followed on
308 .\"O all System V-like systems.
309 ¾åµ­¤ÎÀâÌÀ¤Ï POSIX.1-2001 ¤Î¤â¤Î¤Ç¤¢¤ê¡¢Á´¤Æ¤Î System V É÷¥·¥¹¥Æ¥à¤Ï
310 ¤³¤ì¤Ë½¾¤Ã¤Æ¤¤¤ë¤è¤¦¤Ç¤¢¤ë¡£
311 .\"O Linux kernels before 2.6.12 required the real or
312 .\"O effective user ID of the caller to match
313 .\"O the real user of the process \fIwho\fP (instead of its effective user ID).
314 2.6.12 ¤è¤êÁ°¤Î Linux ¥«¡¼¥Í¥ë¤Ç¤Ï¡¢¸Æ¤Ó½Ð¤·¸µ¤Î¼Â UID ¤Þ¤¿¤Ï
315 ¼Â¸ú UID ¤¬¥×¥í¥»¥¹ \fIwho\fP ¤Î (¼Â¸ú UID ¤Ç¤Ê¤¯)
316 ¼Â UID ¤Ë°ìÃפ¹¤ëɬÍפ¬¤¢¤ë¡£
317 .\"O Linux 2.6.12 and later require
318 .\"O the effective user ID of the caller to match
319 .\"O the real or effective user ID of the process \fIwho\fP.
320 .\"O All BSD-like systems (SunOS 4.1.3, Ultrix 4.2,
321 .\"O 4.3BSD, FreeBSD 4.3, OpenBSD-2.5, ...) behave in the same
322 .\"O manner as Linux 2.6.12 and later.
323 Linux 2.6.12 °Ê¹ß¤Ç¤Ï¡¢¸Æ¤Ó½Ð¤·¸µ¤Î¼Â¹Ô UID ¤¬¥×¥í¥»¥¹ \fIwho\fP
324 ¤Î¼Â UID ¤«¼Â¸ú UID ¤Î¤¤¤º¤ì¤«¤È°ìÃפ¹¤ëɬÍפ¬¤¢¤ë¡£
325 Á´¤Æ¤Î BSD É÷¥·¥¹¥Æ¥à (SunOS 4.1.3, Ultrix 4.2,
326 4.3BSD, FreeBSD 4.3, OpenBSD-2.5Åù) ¤Ï¡¢
327 Linux 2.6.12 °Ê¹ß¤ÈƱ¤¸Æ°ºî¤ò¤¹¤ë¡£
328 .LP
329 .\"O The actual priority range varies between kernel versions.
330 .\"O Linux before 1.3.36 had \-infinity..15.
331 .\"O Since kernel 1.3.43 Linux has the range \-20..19.
332 .\"O Within the kernel, nice values are actually represented
333 .\"O using the corresponding range 40..1
334 .\"O (since negative numbers are error codes) and these are the values
335 .\"O employed by the
336 .\"O .BR setpriority ()
337 .\"O and
338 .\"O .BR getpriority ()
339 .\"O system calls.
340 .\"O The glibc wrapper functions for these system calls handle the
341 .\"O translations between the user-land and kernel representations
342 .\"O of the nice value according to the formula
343 .\"O .IR "unice\ =\ 20\ \-\ knice" .
344 ¼ÂºÝ¤ÎÍ¥ÀèÅÙ¤ÎÃͤÎÈϰϤϥ«¡¼¥Í¥ë¤Î¥Ð¡¼¥¸¥ç¥ó¤Ë¤è¤Ã¤Æ°Û¤Ê¤ë¡£
345 1.3.36 ¤è¤êÁ°¤Î Linux ¤Ç¤Ï¡¢Í¥ÀèÅÙ¤ÎÈϰϤÏÉé¤Î̵¸ÂÂç ¡Á 15 ¤Ç¤¢¤ë¡£
346 1.3.43 °Ê¹ß¤Î Linux ¤Ç¤Ï¡¢Í¥ÀèÅÙ¤ÎÈϰϤϠ\-20 ¡Á 19 ¤Ç¤¢¤ë¡£
347 ¥«¡¼¥Í¥ëÆâÉô¤Ç¤Ï¡¢nice ÃͤϼºݤˤϠ40 ¡Á 1 ¤ÎÈϰϤò»È¤Ã¤Æ
348 ɽ¸½¤µ¤ì¤Æ¤ª¤ê (Éé¤ÎÃͤϥ¨¥é¡¼¥³¡¼¥É¤È¤Ê¤ë¤¿¤á)¡¢¤³¤Á¤é¤ÎÃͤ¬
349 ¥·¥¹¥Æ¥à¥³¡¼¥ë
350 .BR setpriority ()
351 ¤È
352 .BR getpriority ()
353 ¤Ç»ÈÍѤµ¤ì¤Æ¤¤¤ë¡£
354 glibc ¤Î¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Î¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ë¤ª¤¤¤Æ¡¢nice ÃͤÎ
355 ¥æ¡¼¥¶Îΰè (user-land) ¤È¥«¡¼¥Í¥ëɽ¸½¤Î´Ö¤ÎÊÑ´¹¤¬¹Ô¤ï¤ì¤ë¡£
356 ÊÑ´¹¼°¤Ï°Ê²¼¤ÎÄ̤ê:
357 .I "unice\ =\ 20\ \-\ knice"
358 .LP
359 .\"O On some systems, the range of nice values is \-20..20.
360 ¤¤¤¯¤Ä¤«¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¡¢nice ÃͤÎÈϰϤϠ\20 ¡Á 20 ¤Ç¤¢¤ë¡£
361 .LP
362 .\"O Including
363 .\"O .I <sys/time.h>
364 .\"O is not required these days, but increases portability.
365 .\"O (Indeed,
366 .\"O .I <sys/resource.h>
367 .\"O defines the
368 .\"O .I rusage
369 .\"O structure with fields of type
370 .\"O .I struct timeval
371 .\"O defined in
372 .\"O .IR <sys/time.h> .)
373 ¸½ºß¤Ç¤Ï
374 .I <sys/time.h>
375 ¤ò¥¤¥ó¥¯¥ë¡¼¥É¤¹¤ëɬÍפϤʤ¤¤¬¡¢¥¤¥ó¥¯¥ë¡¼¥É¤¹¤ì¤Ð°Ü¿¢À­¤ò¹â¤á¤ë¤³¤È¤¬¤Ç¤­¤ë
376 (¼ÂºÝ¤Ë¤Ï
377 .I <sys/resource.h>
378 ¤Ç
379 .I rusage
380 ¹½Â¤ÂΤ¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤¬¡¢¤½¤Î¥Õ¥£¡¼¥ë¥É¤Ç»ÈÍѤµ¤ì¤Æ¤¤¤ë
381 .I struct timeval
382 ·¿¤Ï
383 .I <sys/time.h>
384 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë)¡£
385 .\"O .SH "SEE ALSO"
386 .SH ´ØÏ¢¹àÌÜ
387 .BR nice (1),
388 .BR fork (2),
389 .BR capabilities (7),
390 .BR renice (8)
391 .sp
392 .\"O .I Documentation/scheduler/sched-nice-design.txt
393 .\"O in the kernel source tree (since Linux 2.6.23).
394 (Linux 2.6.23 °Ê¹ß¤Î) ¥«¡¼¥Í¥ë¤Î¥½¡¼¥¹¥Ä¥ê¡¼Æâ¤Î
395 .I Documentation/scheduler/sched-nice-design.txt