OSDN Git Service

(split) DP: release pages (catch up to 3.50).
[linuxjm/LDP_man-pages.git] / release / 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 2011\-10\-16 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 .\" .SH BUGS
92 .\" As of Linux 1.3.81
93 .\" .BR sched_rr_get_interval ()
94 .\" returns with error
95 .\" ENOSYS, because SCHED_RR has not yet been fully implemented and tested
96 .\" properly.
97 POSIX ではラウンドロビン時間量の大きさを制御する仕組みが規定されていな
98 い。古い Linux カーネルではこれを変更する方法が提供されている (この方法
99 に移植性はない)。プロセスの nice 値を調整することで時間量を制御できる
100 (\fBsetpriority\fP(2) 参照)。 負の nice 値 (すなわち、高い nice 値) を割り
101 当てると時間量は長くなり、 正の nice 値 (すなわち、低い nice 値) を割り
102 当てると時間量は短くなる。 デフォルトの時間量は 0.1 秒である。 nice 値
103 の変更が時間量にどの程度影響を与えるかは カーネルのバージョンにより多少
104 異なる。
105 .SH 関連項目
106 \fBsched_setscheduler\fP(2) に Linux のスケジューリング方式についての説明
107 がある。
108 .PP
109 \fIProgramming for the real world \- POSIX.4\fP by Bill O. Gallmeister, O'Reilly
110 & Associates, Inc., ISBN 1\-56592\-074\-0.
111 .SH この文書について
112 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
113 である。プロジェクトの説明とバグ報告に関する情報は
114 http://www.kernel.org/doc/man\-pages/ に書かれている。