OSDN Git Service

(split) LDP: Translation snapshots for ja.po.
[linuxjm/LDP_man-pages.git] / draft / man2 / sched_rr_get_interval.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (C) Tom Bjorkholm & Markus Kuhn, 1996
4 .\"
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.
9 .\"
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.
14 .\"
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.
19 .\"
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,
23 .\" USA.
24 .\"
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>
28 .\"            revision
29 .\"
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
35 .\"
36 .\"WORD:        interval                間隔
37 .\"WORD:        round robin             ラウンド・ロビン
38 .\"WORD:        process                 プロセス
39 .\"WORD:        scheduling              スケジューリング
40 .\"WORD:        policy                  方針
41 .\"WORD:        implement               実装
42 .\"
43 .TH SCHED_RR_GET_INTERVAL 2 2007-04-06 "Linux" "Linux Programmer's Manual"
44 .\"O .SH NAME
45 .SH 名前
46 .\"O sched_rr_get_interval  \- get the SCHED_RR interval for the named process
47 sched_rr_get_interval  \- 指定されたプロセスの SCHED_RR 間隔を取得する
48 .\"O .SH SYNOPSIS
49 .SH 書式
50 .B #include <sched.h>
51 .sp
52 .BI "int sched_rr_get_interval(pid_t " pid ", struct timespec *" tp );
53 .\"O .SH DESCRIPTION
54 .SH 説明
55 .\"O .BR sched_rr_get_interval ()
56 .\"O writes into the \fItimespec\fP structure pointed to by \fItp\fP the
57 .\"O round robin time quantum for the process identified by \fIpid\fP.
58 .BR sched_rr_get_interval ()
59 は \fItp\fP で指定された \fItimespec\fP 構造体に
60 \fIpid\fP で指定されたプロセスのラウンド・ロビン時間量
61 (round robin time quantum) を書き込む。
62
63 .\"O The \fItimespec\fP structure has the following form:
64 \fItimespec\fP 構造体は以下の通りである:
65
66 .in +4n
67 .nf
68 struct timespec {
69     time_t tv_sec;    /* seconds */
70     long   tv_nsec;   /* nanoseconds */
71 };
72 .fi
73 .in
74
75 .\"O If
76 .\"O \fIpid\fP is zero, the time quantum for the calling process is written
77 .\"O into \fI*tp\fP.
78 .\"O The identified process should be running under the
79 .\"O .B SCHED_RR
80 .\"O scheduling policy.
81 \fIpid\fP がゼロの場合、呼び出したプロセスの時間量が
82 \fI*tp\fP に書き込まれる。指定したプロセスは
83 .B SCHED_RR
84 スケジューリング方針で稼動している必要がある。
85 .\" FIXME . On Linux, sched_rr_get_interval()
86 .\" returns the timeslice for SCHED_OTHER processes -- this timeslice
87 .\" is influenced by the nice value.
88 .\" For SCHED_FIFO processes, this always returns 0.
89 .\"
90 .\"O .\" The round robin time quantum value is not alterable under Linux
91 .\"O .\" 1.3.81.
92 .\" ラウンド・ロビン時間量は Linux 1.3.81 では変更できない。
93 .\" 
94 .\"O POSIX systems on which
95 .\"O .BR sched_rr_get_interval ()
96 .\"O is available define
97 .\"O .B _POSIX_PRIORITY_SCHEDULING
98 .\"O in \fI<unistd.h>\fP.
99 .BR sched_rr_get_interval ()
100 の使用可能な POSIX システムでは
101 .I <unistd.h>
102
103 .B _POSIX_PRIORITY_SCHEDULING
104 が定義されている。
105 .\"O .SH "RETURN VALUE"
106 .SH 返り値
107 .\"O On success,
108 .\"O .BR sched_rr_get_interval ()
109 .\"O returns 0.
110 .\"O On error, \-1 is returned, and
111 .\"O .I errno
112 .\"O is set appropriately.
113 成功した場合は
114 .BR sched_rr_get_interval ()
115 は 0 を返す。
116 エラーの場合は \-1 が返され、
117 .I errno
118 が適切に設定される。
119 .\"O .SH ERRORS
120 .SH エラー
121 .TP
122 .B EFAULT
123 .\"O Problem with copying information to userspace.
124 情報をユーザ空間にコピーする時に問題が起きた。
125 .TP
126 .B EINVAL
127 .\"O Invalid pid.
128 PID が不正である。
129 .TP
130 .B ENOSYS
131 .\"O The system call is not yet implemented (only on rather old kernels).
132 システム・コールがまだ実装されていない (かなり古いカーネルにおいてのみ)。
133 .TP
134 .B ESRCH
135 .\"O The process whose ID is \fIpid\fP could not be found.
136 \fIpid\fP の ID を持つプロセスが見つからなかった。
137 .\"O .SH "CONFORMING TO"
138 .SH 準拠
139 POSIX.1-2001.
140 .\"O .SH NOTES
141 .\"O .SS Linux Notes
142 .SH 注意
143 .SS Linux での注意
144 .\" FIXME
145 .\" From at least Linux 2.6.9, the following is no longer true
146 .\" for SCHED_RR processes.  For RR processes the timeslice is always
147 .\" DEF_TIMESLICE, or 0.1 secs.
148 .\" Was the following really true for older kernels?
149 .\" Must build a 2.6.8 kernel and retest, and rewrite the following text
150 .\" appropriately.
151 .\"O POSIX does not specify any mechanism for controlling the size of the
152 .\"O round-robin time quantum.
153 .\"O However, Linux provides a (nonportable) method of doing this.
154 .\"O The quantum can be controlled by adjusting the process's nice value (see
155 .\"O .BR setpriority (2)).
156 .\"O Assigning a negative (i.e., high) nice value results in a longer quantum;
157 .\"O assigning a positive (i.e., low) nice value results in a shorter quantum.
158 .\"O The default quantum is 0.1 seconds;
159 .\"O the degree to which changing the nice value affects the
160 .\"O quantum has varied somewhat across kernel versions.
161 POSIX ではラウンド・ロビン時間量の大きさを制御する仕組みが規定されていない。
162 しかし、Linux ではこれを変更する方法が提供されており (この方法に移植性はない)、
163 プロセスの nice 値を調整することで時間量を制御できる
164 .RB ( setpriority (2)
165 参照)。
166 負の nice 値 (すなわち、高い nice 値) を割り当てると時間量は長くなり、
167 正の nice 値 (すなわち、低い nice 値) を割り当てると時間量は短くなる。
168 デフォルトの時間量は 0.1 秒である。
169 nice 値の変更が時間量にどの程度影響を与えるかは
170 カーネルのバージョンにより多少異なる。
171 .\"O .\" .SH BUGS
172 .\" .SH バグ
173 .\"O .\" As of Linux 1.3.81
174 .\"O .\" .BR sched_rr_get_interval ()
175 .\"O .\" returns with error
176 .\"O .\" ENOSYS, because SCHED_RR has not yet been fully implemented and tested
177 .\"O .\" properly.
178 .\" Linux 1.3.81 の時点では
179 .\" .BR sched_rr_get_interval ()
180 .\" は ENOSYS エラーを返す。
181 .\" これは SCHED_RR はまだ完全には実装されておらず、
182 .\" 適切にテストされていないからである。
183 .\"O .SH "SEE ALSO"
184 .SH 関連項目
185 .\"O .BR sched_setscheduler (2)
186 .\"O has a description of the Linux scheduling scheme.
187 .BR sched_setscheduler (2)
188 に Linux のスケジューリング方式についての説明がある。
189 .PP
190 .I Programming for the real world \- POSIX.4
191 by Bill O. Gallmeister, O'Reilly & Associates, Inc., ISBN 1-56592-074-0