-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
.\" Copyright (C) Tom Bjorkholm, Markus Kuhn & David A. Wheeler 1996-1999
.\" and Copyright (C) 2007 Carsten Emde <Carsten.Emde@osadl.org>
.\" and Copyright (C) 2008 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
+.\" %%%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
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH SCHED_SETSCHEDULER 2 2011\-09\-19 Linux "Linux Programmer's Manual"
+.TH SCHED_SETSCHEDULER 2 2013\-02\-12 Linux "Linux Programmer's Manual"
.SH 名前
sched_setscheduler, sched_getscheduler \- スケジューリング・ポリシーとパラメータを設定/取得する
.SH 書式
\fBSCHED_FIFO\fP プロセスは I/O 要求によって停止するか、 より高い優先度のプロセスによって置きかえられるか、
\fBsched_yield\fP(2) を呼び出すまで実行を続ける。
-.SS "SCHED_RR: ラウンドロビン (round robin) ・スケジューリング"
+.SS "SCHED_RR: ラウンドロビン (round\-robin)・スケジューリング"
.\" On Linux 2.4, the length of the RR interval is influenced
.\" by the process nice value -- MTK
.\"
詳細はシステムにより異なる。 例えば、Solaris 7 のマニュアルページでは、 呼び出し元プロセスの実ユーザ ID または実効ユーザ ID が
設定対象のプロセスの実ユーザ ID か保存 (save) set\-user\-ID と 一致していなければならない、となっている。
.PP
+The scheduling policy and parameters are in fact per\-thread attributes on
+Linux. The value returned from a call to \fBgettid\fP(2) can be passed in the
+argument \fIpid\fP. Specifying \fIpid\fP as 0 will operate on the attribute for
+the calling thread, and passing the value returned from a call to
+\fBgetpid\fP(2) will operate on the attribute for the main thread of the
+thread group. (If you are using the POSIX threads API, then use
+\fBpthread_setschedparam\fP(3), \fBpthread_getschedparam\fP(3), and
+\fBpthread_setschedprio\fP(3), instead of the \fBsched_*\fP(2) system calls.)
+.PP
もともとは、標準の Linux は一般目的のオペレーティングシステムとして 設計されており、バックグラウンド・プロセスや対話的アプリケーション、
リアルタイム性の要求が厳しくないリアルタイム・アプリケーション (普通はタイミングの応答期限 (deadline) を満たす必要があるアプリケーション)
を扱うことができた。 Linux カーネル 2.6 では、 カーネルのプリエンプション (タスクの置き換え) が可能であり、 新たに導入された O(1)
.fi
.in
.PP
-という名前で、 \fIhttp://www.kernel.org/pub/linux/kernel/projects/rt/\fP からダウンロードできる。
+という名前で、
+.UR http://www.kernel.org\:/pub\:/linux\:/kernel\:/projects\:/rt/
+.UE
+からダウンロードできる。
このパッチが適用されず、かつパッチの内容の本流のカーネルへのマージが 完了するまでは、カーネルの設定では \fBCONFIG_PREEMPT_NONE\fP,
\fBCONFIG_PREEMPT_VOLUNTARY\fP, \fBCONFIG_PREEMPT_DESKTOP\fP の 3つのプリエンプション・クラス
POSIX では、成功時に \fBsched_setscheduler\fP() は直前のスケジューリング・ポリシーを返すべきとされている。 Linux の
\fBsched_setscheduler\fP() はこの要求仕様に準拠しておらず、 成功時には常に 0 を返す。
.SH 関連項目
-\fBgetpriority\fP(2), \fBmlock\fP(2), \fBmlockall\fP(2), \fBmunlock\fP(2),
+.ad l
+.nh
+\fBchrt\fP(1), \fBgetpriority\fP(2), \fBmlock\fP(2), \fBmlockall\fP(2), \fBmunlock\fP(2),
\fBmunlockall\fP(2), \fBnice\fP(2), \fBsched_get_priority_max\fP(2),
\fBsched_get_priority_min\fP(2), \fBsched_getaffinity\fP(2), \fBsched_getparam\fP(2),
\fBsched_rr_get_interval\fP(2), \fBsched_setaffinity\fP(2), \fBsched_setparam\fP(2),
\fBsched_yield\fP(2), \fBsetpriority\fP(2), \fBcapabilities\fP(7), \fBcpuset\fP(7)
+.ad j
.PP
\fIProgramming for the real world \- POSIX.4\fP by Bill O. Gallmeister, O'Reilly
-& Associates, Inc., ISBN 1\-56592\-074\-0
+& Associates, Inc., ISBN 1\-56592\-074\-0.
.PP
-カーネル・ソース内のファイル \fIDocumentation/scheduler/sched\-rt\-group.txt\fP (カーネル 2.6.25
+Linux カーネルソース内の \fIDocumentation/scheduler/sched\-rt\-group.txt\fP (カーネル 2.6.25
以降)
.SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
である。プロジェクトの説明とバグ報告に関する情報は
http://www.kernel.org/doc/man\-pages/ に書かれている。