OSDN Git Service

4f594f2e010be8afbd2b6a925e7eeb346dfbd830
[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 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 does not specify any mechanism for controlling the size of the
92 round\-robin time quantum.  Older Linux kernels provide a (nonportable)
93 method of doing this.  The quantum can be controlled by adjusting the
94 process's nice value (see \fBsetpriority\fP(2)).  Assigning a negative (i.e.,
95 high) nice value results in a longer quantum; assigning a positive (i.e.,
96 low) nice value results in a shorter quantum.  The default quantum is 0.1
97 seconds; the degree to which changing the nice value affects the quantum has
98 varied somewhat across kernel versions.  This method of adjusting the
99 quantum was removed starting with Linux 2.6.24.
100
101 .\" commit ce0dbbbb30aee6a835511d5be446462388ba9eee
102 .\" .SH BUGS
103 .\" As of Linux 1.3.81
104 .\" .BR sched_rr_get_interval ()
105 .\" returns with error
106 .\" ENOSYS, because SCHED_RR has not yet been fully implemented and tested
107 .\" properly.
108 Linux 3.9 added a new mechanism for adjusting (and viewing) the \fBSCHED_RR\fP
109 quantum: the \fI/proc/sys/kernel/sched_rr_timeslice_ms\fP file exposes the
110 quantum as a millisecond value, whose default is 100.  Writing 0 to this
111 file resets the quantum to the default value.
112 .SH 関連項目
113 \fBsched_setscheduler\fP(2) に Linux のスケジューリング方式についての説明
114 がある。
115 .PP
116 \fIProgramming for the real world \- POSIX.4\fP by Bill O. Gallmeister, O'Reilly
117 & Associates, Inc., ISBN 1\-56592\-074\-0.
118 .SH この文書について
119 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
120 である。プロジェクトの説明とバグ報告に関する情報は
121 http://www.kernel.org/doc/man\-pages/ に書かれている。