OSDN Git Service

(split) LDP: Update releases based on LDP 3.52 release
[linuxjm/LDP_man-pages.git] / release / man2 / sched_rr_get_interval.2
index 526f245..e5c7884 100644 (file)
@@ -1,7 +1,6 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
 .\" Copyright (C) Tom Bjorkholm & Markus Kuhn, 1996
 .\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
 .\" This is free documentation; you can redistribute it and/or
 .\" modify it under the terms of the GNU General Public License as
 .\" published by the Free Software Foundation; either version 2 of
 .\" GNU General Public License for more details.
 .\"
 .\" You should have received a copy of the GNU General Public
-.\" License along with this manual; if not, write to the Free
-.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
-.\" USA.
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
 .\"
 .\" 1996-04-01 Tom Bjorkholm <tomb@mydata.se>
 .\"            First version written
 .\" 1996-04-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
 .\"            revision
 .\"
-.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
-.\"         all rights reserved.
-.\" Translated 1997-02-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
-.\" Updated 2003-10-11, Kentaro Shirakata <argrath@ub32.org>
-.\" Updated 2007-05-28, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.48
+.\"*******************************************************************
 .\"
-.\"WORD:       interval                ´Ö³Ö
-.\"WORD:       round robin             ¥é¥¦¥ó¥É¡¦¥í¥Ó¥ó
-.\"WORD:       process                 ¥×¥í¥»¥¹
-.\"WORD:       scheduling              ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°
-.\"WORD:       policy                  Êý¿Ë
-.\"WORD:       implement               ¼ÂÁõ
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH SCHED_RR_GET_INTERVAL 2 2007-04-06 "Linux" "Linux Programmer's Manual"
-.SH Ì¾Á°
-sched_rr_get_interval  \- »ØÄꤵ¤ì¤¿¥×¥í¥»¥¹¤Î SCHED_RR ´Ö³Ö¤ò¼èÆÀ¤¹¤ë
-.SH ½ñ¼°
-.B #include <sched.h>
+.\"*******************************************************************
+.TH SCHED_RR_GET_INTERVAL 2 2013\-03\-18 Linux "Linux Programmer's Manual"
+.SH 名前
+sched_rr_get_interval \- 指定されたプロセスの SCHED_RR 間隔を取得する
+.SH 書式
+\fB#include <sched.h>\fP
 .sp
-.BI "int sched_rr_get_interval(pid_t " pid ", struct timespec *" tp );
-.SH ÀâÌÀ
-.BR sched_rr_get_interval ()
-¤Ï \fItp\fP ¤Ç»ØÄꤵ¤ì¤¿ \fItimespec\fP ¹½Â¤ÂΤË
-\fIpid\fP ¤Ç»ØÄꤵ¤ì¤¿¥×¥í¥»¥¹¤Î¥é¥¦¥ó¥É¡¦¥í¥Ó¥ó»þ´ÖÎÌ
-(round robin time quantum) ¤ò½ñ¤­¹þ¤à¡£
+\fBint sched_rr_get_interval(pid_t \fP\fIpid\fP\fB, struct timespec *\fP\fItp\fP\fB);\fP
+.SH 説明
+\fBsched_rr_get_interval\fP() は \fItp\fP で指定された \fItimespec\fP 構造体に
+\fIpid\fP で指定されたプロセスのラウンドロビン時間量 (round robin time
+quantum) を書き込む。指定されたプロセスは \fBSCHED_RR\fP スケジューリング
+ポリシーで動作しているはずである。
 
-\fItimespec\fP ¹½Â¤ÂΤϰʲ¼¤ÎÄ̤ê¤Ç¤¢¤ë:
+\fItimespec\fP 構造体は以下の通りである:
 
 .in +4n
 .nf
@@ -64,73 +55,62 @@ struct timespec {
 .fi
 .in
 
-\fIpid\fP ¤¬¥¼¥í¤Î¾ì¹ç¡¢¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î»þ´ÖÎ̤¬
-\fI*tp\fP ¤Ë½ñ¤­¹þ¤Þ¤ì¤ë¡£»ØÄꤷ¤¿¥×¥í¥»¥¹¤Ï
-.B SCHED_RR
-¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Êý¿Ë¤Ç²ÔÆ°¤·¤Æ¤¤¤ëɬÍפ¬¤¢¤ë¡£
 .\" FIXME . On Linux, sched_rr_get_interval()
 .\" returns the timeslice for SCHED_OTHER processes -- this timeslice
 .\" is influenced by the nice value.
 .\" For SCHED_FIFO processes, this always returns 0.
 .\"
-.\" ¥é¥¦¥ó¥É¡¦¥í¥Ó¥ó»þ´ÖÎ̤ϠLinux 1.3.81 ¤Ç¤ÏÊѹ¹¤Ç¤­¤Ê¤¤¡£
-.\" 
-.BR sched_rr_get_interval ()
-¤Î»ÈÍѲÄǽ¤Ê POSIX ¥·¥¹¥Æ¥à¤Ç¤Ï
-.I <unistd.h>
-¤Ç
-.B _POSIX_PRIORITY_SCHEDULING
-¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
-.SH ÊÖ¤êÃÍ
-À®¸ù¤·¤¿¾ì¹ç¤Ï
-.BR sched_rr_get_interval ()
-¤Ï 0 ¤òÊÖ¤¹¡£
-¥¨¥é¡¼¤Î¾ì¹ç¤Ï \-1 ¤¬ÊÖ¤µ¤ì¡¢
-.I errno
-¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
-.SH ¥¨¥é¡¼
-.TP
-.B EFAULT
-¾ðÊó¤ò¥æ¡¼¥¶¶õ´Ö¤Ë¥³¥Ô¡¼¤¹¤ë»þ¤ËÌäÂ꤬µ¯¤­¤¿¡£
-.TP
-.B EINVAL
-PID ¤¬ÉÔÀµ¤Ç¤¢¤ë¡£
-.TP
-.B ENOSYS
-¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤¬¤Þ¤À¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤ (¤«¤Ê¤ê¸Å¤¤¥«¡¼¥Í¥ë¤Ë¤ª¤¤¤Æ¤Î¤ß)¡£
-.TP
-.B ESRCH
-\fIpid\fP ¤Î ID ¤ò»ý¤Ä¥×¥í¥»¥¹¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¡£
-.SH ½àµò
-POSIX.1-2001.
-.SH Ãí°Õ
-.SS Linux ¤Ç¤ÎÃí°Õ
-.\" FIXME
-.\" From at least Linux 2.6.9, the following is no longer true
-.\" for SCHED_RR processes.  For RR processes the timeslice is always
-.\" DEF_TIMESLICE, or 0.1 secs.
-.\" Was the following really true for older kernels?
-.\" Must build a 2.6.8 kernel and retest, and rewrite the following text
-.\" appropriately.
-POSIX ¤Ç¤Ï¥é¥¦¥ó¥É¡¦¥í¥Ó¥ó»þ´ÖÎ̤ÎÂ礭¤µ¤òÀ©¸æ¤¹¤ë»ÅÁȤߤ¬µ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
-¤·¤«¤·¡¢Linux ¤Ç¤Ï¤³¤ì¤òÊѹ¹¤¹¤ëÊýË¡¤¬Ä󶡤µ¤ì¤Æ¤ª¤ê (¤³¤ÎÊýË¡¤Ë°Ü¿¢À­¤Ï¤Ê¤¤)¡¢
-¥×¥í¥»¥¹¤Î nice ÃͤòÄ´À°¤¹¤ë¤³¤È¤Ç»þ´ÖÎ̤òÀ©¸æ¤Ç¤­¤ë
-.RB ( setpriority (2)
-»²¾È)¡£
-Éé¤Î nice ÃÍ (¤¹¤Ê¤ï¤Á¡¢¹â¤¤ nice ÃÍ) ¤ò³ä¤êÅö¤Æ¤ë¤È»þ´ÖÎ̤ÏŤ¯¤Ê¤ê¡¢
-Àµ¤Î nice ÃÍ (¤¹¤Ê¤ï¤Á¡¢Ä㤤 nice ÃÍ) ¤ò³ä¤êÅö¤Æ¤ë¤È»þ´ÖÎ̤Ïû¤¯¤Ê¤ë¡£
-¥Ç¥Õ¥©¥ë¥È¤Î»þ´ÖÎ̤Ϡ0.1 ÉäǤ¢¤ë¡£
-nice ÃͤÎÊѹ¹¤¬»þ´ÖÎ̤ˤɤÎÄøÅٱƶÁ¤òÍ¿¤¨¤ë¤«¤Ï
-¥«¡¼¥Í¥ë¤Î¥Ð¡¼¥¸¥ç¥ó¤Ë¤è¤ê¿¾¯°Û¤Ê¤ë¡£
-.\" .SH ¥Ð¥°
-.\" Linux 1.3.81 ¤Î»þÅÀ¤Ç¤Ï
+.\" The round-robin time quantum value is not alterable under Linux
+.\" 1.3.81.
+.\"
+\fIpid\fP が 0 の場合、呼び出したプロセスの時間量 (time quantum) が
+\fI*tp\fP に書き込まれる。
+.SH 返り値
+成功した場合は \fBsched_rr_get_interval\fP()  は 0 を返す。 エラーの場合は \-1 が返され、 \fIerrno\fP
+が適切に設定される。
+.SH エラー
+.TP 
+\fBEFAULT\fP
+情報をユーザ空間にコピーする時に問題が起きた。
+.TP 
+\fBEINVAL\fP
+PID が不正である。
+.TP 
+\fBENOSYS\fP
+システム・コールがまだ実装されていない (かなり古いカーネルにおいてのみ)。
+.TP 
+\fBESRCH\fP
+プロセス ID が \fIpid\fP のプロセスが見つからなかった。
+.SH 準拠
+POSIX.1\-2001.
+.SH 注意
+POSIX システムで \fBsched_rr_get_interval\fP() は \fI<unistd.h>\fP に
+\fB_POSIX_PRIORITY_SCHEDULING\fP が定義されている場合にのみ使用可能である。
+.SS "Linux での注意"
+.\" commit a4ec24b48ddef1e93f7578be53270f0b95ad666c
+POSIX ではラウンドロビン時間量の大きさを制御する仕組みが規定されていない。 古い Linux カーネルではこれを変更する方法が提供されている
+(この方法に移植性はない)。 プロセスの nice 値を調整することで時間量を制御できる (\fBsetpriority\fP(2) 参照)。 負の nice
+値 (すなわち、高い nice 値) を割り当てると時間量は長くなり、 正の nice 値 (すなわち、低い nice 値)
+を割り当てると時間量は短くなる。 デフォルトの時間量は 0.1 秒である。 nice 値の変更が時間量にどの程度影響を与えるかは
+カーネルのバージョンにより多少異なる。時間量を調整するこのメソッドは Linux 2.6.24 以降で削除された。
+
+.\" commit ce0dbbbb30aee6a835511d5be446462388ba9eee
+.\" .SH BUGS
+.\" As of Linux 1.3.81
 .\" .BR sched_rr_get_interval ()
-.\" ¤Ï ENOSYS ¥¨¥é¡¼¤òÊÖ¤¹¡£
-.\" ¤³¤ì¤Ï SCHED_RR ¤Ï¤Þ¤À´°Á´¤Ë¤Ï¼ÂÁõ¤µ¤ì¤Æ¤ª¤é¤º¡¢
-.\" Å¬Àڤ˥ƥ¹¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£
-.SH ´ØÏ¢¹àÌÜ
-.BR sched_setscheduler (2)
-¤Ë Linux ¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Êý¼°¤Ë¤Ä¤¤¤Æ¤ÎÀâÌÀ¤¬¤¢¤ë¡£
+.\" returns with error
+.\" ENOSYS, because SCHED_RR has not yet been fully implemented and tested
+.\" properly.
+Linux 3.9 で、 \fBSCHED_RR\fP の時間量の調整 (と参照) を行う新しい機構が追加された。
+\fI/proc/sys/kernel/sched_rr_timeslice_ms\fP ファイルでミリ秒単位の時間量の値が参照でき、 デフォルト値は 100
+である。 このファイルに 0 を書き込むと、 時間量をデフォルト値に戻すことができる。
+.SH 関連項目
+\fBsched_setscheduler\fP(2) に Linux のスケジューリング方式についての説明
+がある。
 .PP
-.I Programming for the real world \- POSIX.4
-by Bill O. Gallmeister, O'Reilly & Associates, Inc., ISBN 1-56592-074-0
+\fIProgramming for the real world \- POSIX.4\fP by Bill O. Gallmeister, O'Reilly
+& Associates, Inc., ISBN 1\-56592\-074\-0.
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。