1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (C) Tom Bjorkholm & Markus Kuhn, 1996
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.
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.
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.
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,
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>
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 2003-10-11, Kentaro Shirakata <argrath@ub32.org>
34 .\" Updated 2007-05-28, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.48
36 .\"WORD: interval ´Ö³Ö
37 .\"WORD: round robin ¥é¥¦¥ó¥É¡¦¥í¥Ó¥ó
38 .\"WORD: process ¥×¥í¥»¥¹
39 .\"WORD: scheduling ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°
41 .\"WORD: implement ¼ÂÁõ
43 .TH SCHED_RR_GET_INTERVAL 2 2007-04-06 "Linux" "Linux Programmer's Manual"
45 sched_rr_get_interval \- »ØÄꤵ¤ì¤¿¥×¥í¥»¥¹¤Î SCHED_RR ´Ö³Ö¤ò¼èÆÀ¤¹¤ë
49 .BI "int sched_rr_get_interval(pid_t " pid ", struct timespec *" tp );
51 .BR sched_rr_get_interval ()
52 ¤Ï \fItp\fP ¤Ç»ØÄꤵ¤ì¤¿ \fItimespec\fP ¹½Â¤ÂΤË
53 \fIpid\fP ¤Ç»ØÄꤵ¤ì¤¿¥×¥í¥»¥¹¤Î¥é¥¦¥ó¥É¡¦¥í¥Ó¥ó»þ´ÖÎÌ
54 (round robin time quantum) ¤ò½ñ¤¹þ¤à¡£
56 \fItimespec\fP ¹½Â¤ÂΤϰʲ¼¤ÎÄ̤ê¤Ç¤¢¤ë:
61 time_t tv_sec; /* seconds */
62 long tv_nsec; /* nanoseconds */
67 \fIpid\fP ¤¬¥¼¥í¤Î¾ì¹ç¡¢¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î»þ´ÖÎ̤¬
68 \fI*tp\fP ¤Ë½ñ¤¹þ¤Þ¤ì¤ë¡£»ØÄꤷ¤¿¥×¥í¥»¥¹¤Ï
70 ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Êý¿Ë¤Ç²ÔÆ°¤·¤Æ¤¤¤ëɬÍפ¬¤¢¤ë¡£
71 .\" FIXME . On Linux, sched_rr_get_interval()
72 .\" returns the timeslice for SCHED_OTHER processes -- this timeslice
73 .\" is influenced by the nice value.
74 .\" For SCHED_FIFO processes, this always returns 0.
76 .\" ¥é¥¦¥ó¥É¡¦¥í¥Ó¥ó»þ´ÖÎÌ¤Ï Linux 1.3.81 ¤Ç¤ÏÊѹ¹¤Ç¤¤Ê¤¤¡£
78 .BR sched_rr_get_interval ()
79 ¤Î»ÈÍѲÄǽ¤Ê POSIX ¥·¥¹¥Æ¥à¤Ç¤Ï
82 .B _POSIX_PRIORITY_SCHEDULING
86 .BR sched_rr_get_interval ()
88 ¥¨¥é¡¼¤Î¾ì¹ç¤Ï \-1 ¤¬ÊÖ¤µ¤ì¡¢
94 ¾ðÊó¤ò¥æ¡¼¥¶¶õ´Ö¤Ë¥³¥Ô¡¼¤¹¤ë»þ¤ËÌäÂ꤬µ¯¤¤¿¡£
100 ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤¬¤Þ¤À¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤ (¤«¤Ê¤ê¸Å¤¤¥«¡¼¥Í¥ë¤Ë¤ª¤¤¤Æ¤Î¤ß)¡£
103 \fIpid\fP ¤Î ID ¤ò»ý¤Ä¥×¥í¥»¥¹¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¡£
109 .\" From at least Linux 2.6.9, the following is no longer true
110 .\" for SCHED_RR processes. For RR processes the timeslice is always
111 .\" DEF_TIMESLICE, or 0.1 secs.
112 .\" Was the following really true for older kernels?
113 .\" Must build a 2.6.8 kernel and retest, and rewrite the following text
115 POSIX ¤Ç¤Ï¥é¥¦¥ó¥É¡¦¥í¥Ó¥ó»þ´ÖÎ̤ÎÂ礤µ¤òÀ©¸æ¤¹¤ë»ÅÁȤߤ¬µ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
116 ¤·¤«¤·¡¢Linux ¤Ç¤Ï¤³¤ì¤òÊѹ¹¤¹¤ëÊýË¡¤¬Ä󶡤µ¤ì¤Æ¤ª¤ê (¤³¤ÎÊýË¡¤Ë°Ü¿¢À¤Ï¤Ê¤¤)¡¢
117 ¥×¥í¥»¥¹¤Î nice ÃͤòÄ´À°¤¹¤ë¤³¤È¤Ç»þ´ÖÎ̤òÀ©¸æ¤Ç¤¤ë
118 .RB ( setpriority (2)
120 Éé¤Î nice ÃÍ (¤¹¤Ê¤ï¤Á¡¢¹â¤¤ nice ÃÍ) ¤ò³ä¤êÅö¤Æ¤ë¤È»þ´ÖÎ̤ÏŤ¯¤Ê¤ê¡¢
121 Àµ¤Î nice ÃÍ (¤¹¤Ê¤ï¤Á¡¢Ä㤤 nice ÃÍ) ¤ò³ä¤êÅö¤Æ¤ë¤È»þ´ÖÎ̤Ïû¤¯¤Ê¤ë¡£
122 ¥Ç¥Õ¥©¥ë¥È¤Î»þ´ÖÎÌ¤Ï 0.1 ÉäǤ¢¤ë¡£
123 nice ÃͤÎÊѹ¹¤¬»þ´ÖÎ̤ˤɤÎÄøÅٱƶÁ¤òÍ¿¤¨¤ë¤«¤Ï
124 ¥«¡¼¥Í¥ë¤Î¥Ð¡¼¥¸¥ç¥ó¤Ë¤è¤ê¿¾¯°Û¤Ê¤ë¡£
126 .\" Linux 1.3.81 ¤Î»þÅÀ¤Ç¤Ï
127 .\" .BR sched_rr_get_interval ()
128 .\" ¤Ï ENOSYS ¥¨¥é¡¼¤òÊÖ¤¹¡£
129 .\" ¤³¤ì¤Ï SCHED_RR ¤Ï¤Þ¤À´°Á´¤Ë¤Ï¼ÂÁõ¤µ¤ì¤Æ¤ª¤é¤º¡¢
130 .\" ŬÀڤ˥ƥ¹¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£
132 .BR sched_setscheduler (2)
133 ¤Ë Linux ¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Êý¼°¤Ë¤Ä¤¤¤Æ¤ÎÀâÌÀ¤¬¤¢¤ë¡£
135 .I Programming for the real world \- POSIX.4
136 by Bill O. Gallmeister, O'Reilly & Associates, Inc., ISBN 1-56592-074-0