OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man2 / sched_rr_get_interval.2
1 .\" Copyright (C) Tom Bjorkholm & Markus Kuhn, 1996
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
22 .\" %%%LICENSE_END
23 .\"
24 .\" 1996-04-01 Tom Bjorkholm <tomb@mydata.se>
25 .\"            First version written
26 .\" 1996-04-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
27 .\"            revision
28 .\"
29 .\"*******************************************************************
30 .\"
31 .\" This file was generated with po4a. Translate the source file.
32 .\"
33 .\"*******************************************************************
34 .TH SCHED_RR_GET_INTERVAL 2 2013\-03\-18 Linux "Linux Programmer's Manual"
35 .SH 名前
36 sched_rr_get_interval \- 指定されたプロセスの SCHED_RR 間隔を取得する
37 .SH 書式
38 \fB#include <sched.h>\fP
39 .sp
40 \fBint sched_rr_get_interval(pid_t \fP\fIpid\fP\fB, struct timespec *\fP\fItp\fP\fB);\fP
41 .SH 説明
42 \fBsched_rr_get_interval\fP() は \fItp\fP で指定された \fItimespec\fP 構造体に
43 \fIpid\fP で指定されたプロセスのラウンドロビン時間量 (round robin time
44 quantum) を書き込む。指定されたプロセスは \fBSCHED_RR\fP スケジューリング
45 ポリシーで動作しているはずである。
46
47 \fItimespec\fP 構造体は以下の通りである:
48
49 .in +4n
50 .nf
51 struct timespec {
52     time_t tv_sec;    /* seconds */
53     long   tv_nsec;   /* nanoseconds */
54 };
55 .fi
56 .in
57
58 .\" FIXME . On Linux, sched_rr_get_interval()
59 .\" returns the timeslice for SCHED_OTHER processes -- this timeslice
60 .\" is influenced by the nice value.
61 .\" For SCHED_FIFO processes, this always returns 0.
62 .\"
63 .\" The round-robin time quantum value is not alterable under Linux
64 .\" 1.3.81.
65 .\"
66 \fIpid\fP が 0 の場合、呼び出したプロセスの時間量 (time quantum) が
67 \fI*tp\fP に書き込まれる。
68 .SH 返り値
69 成功した場合は \fBsched_rr_get_interval\fP()  は 0 を返す。 エラーの場合は \-1 が返され、 \fIerrno\fP
70 が適切に設定される。
71 .SH エラー
72 .TP 
73 \fBEFAULT\fP
74 情報をユーザ空間にコピーする時に問題が起きた。
75 .TP 
76 \fBEINVAL\fP
77 PID が不正である。
78 .TP 
79 \fBENOSYS\fP
80 システム・コールがまだ実装されていない (かなり古いカーネルにおいてのみ)。
81 .TP 
82 \fBESRCH\fP
83 プロセス ID が \fIpid\fP のプロセスが見つからなかった。
84 .SH 準拠
85 POSIX.1\-2001.
86 .SH 注意
87 POSIX システムで \fBsched_rr_get_interval\fP() は \fI<unistd.h>\fP に
88 \fB_POSIX_PRIORITY_SCHEDULING\fP が定義されている場合にのみ使用可能である。
89 .SS "Linux での注意"
90 .\" commit a4ec24b48ddef1e93f7578be53270f0b95ad666c
91 POSIX ではラウンドロビン時間量の大きさを制御する仕組みが規定されていない。 古い Linux カーネルではこれを変更する方法が提供されている
92 (この方法に移植性はない)。 プロセスの nice 値を調整することで時間量を制御できる (\fBsetpriority\fP(2) 参照)。 負の nice
93 値 (すなわち、高い nice 値) を割り当てると時間量は長くなり、 正の nice 値 (すなわち、低い nice 値)
94 を割り当てると時間量は短くなる。 デフォルトの時間量は 0.1 秒である。 nice 値の変更が時間量にどの程度影響を与えるかは
95 カーネルのバージョンにより多少異なる。時間量を調整するこのメソッドは Linux 2.6.24 以降で削除された。
96
97 .\" commit ce0dbbbb30aee6a835511d5be446462388ba9eee
98 .\" .SH BUGS
99 .\" As of Linux 1.3.81
100 .\" .BR sched_rr_get_interval ()
101 .\" returns with error
102 .\" ENOSYS, because SCHED_RR has not yet been fully implemented and tested
103 .\" properly.
104 Linux 3.9 で、 \fBSCHED_RR\fP の時間量の調整 (と参照) を行う新しい機構が追加された。
105 \fI/proc/sys/kernel/sched_rr_timeslice_ms\fP ファイルでミリ秒単位の時間量の値が参照でき、 デフォルト値は 100
106 である。 このファイルに 0 を書き込むと、 時間量をデフォルト値に戻すことができる。
107 .SH 関連項目
108 \fBsched_setscheduler\fP(2) に Linux のスケジューリング方式についての説明
109 がある。
110 .PP
111 \fIProgramming for the real world \- POSIX.4\fP by Bill O. Gallmeister, O'Reilly
112 & Associates, Inc., ISBN 1\-56592\-074\-0.
113 .SH この文書について
114 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
115 である。プロジェクトの説明とバグ報告に関する情報は
116 http://www.kernel.org/doc/man\-pages/ に書かれている。