tail head cat sleep
QR code linking to this page

manページ  — SCHED_GET_PRIORITY_MAX

名称

sched_get_priority_max, sched_get_priority_min, sched_rr_get_interval – スケジュールパラメータの上限 / 下限を取得する

内容

ライブラリ

Standard C Library (libc, -lc)

書式

#include <sched.h>

int
sched_get_priority_max(int policy);

int
sched_get_priority_min(int policy);

int
sched_rr_get_interval(pid_t pid, struct timespec *interval);

解説

sched_get_priority_max() システムコールと sched_get_priority_min() システムコールは、 policy で指定されたスケジューリング方針について、 それぞれ該当する最大と最小を返します。 sched_rr_get_interval() システムコールは、 interval 引数によって参照される timespec 構造体を、 pid で指定されるプロセスについて 現在の実行時間制限 (すなわち、時間量) が含まれるように更新します。 pid が 0 の場合、呼び出し元プロセスに関する現在の実行時間制限が返されます。

policy の値は <sched.h> で定義されたスケジュール方針の 1 つにする必要があります:
[SCHED_FIFO] ラウンドロビンスケジュールなしの先入先出 (FIFO) 固定優先順位スケジュール。
[SCHED_OTHER]
  標準のタイムシェアリングスケジューラ。
[SCHED_RR] 同じ優先順位のプロセス間でのラウンドロビンスケジューリング。

戻り値

sched_get_priority_max() システムコールと sched_get_priority_min() システムコールは、正常に完了するとそれぞれ該当する最大値または最小値を返します。 そうでない場合、どちらの関数も -1 が返され、エラーを示すために errno が設定されます。

The sched_rr_get_interval function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

エラー

処理を失敗すると、 errno は対応する値に設定されます:
[EINVAL]
  policy 引数の値が定義されているスケジュール方針ではありません。
[ENOSYS]
  sched_get_priority_max() システムコール、 sched_get_priority_min() システムコール、そして sched_rr_get_interval() システムコールは、この実装ではサポートされていません。
[ESRCH]
  pid で指定されるプロセスに対応するプロセスが見つかりません。

関連項目

sched_getparam(2), sched_getscheduler(2), sched_setparam(2), sched_setscheduler(2)

規格

sched_get_priority_max() システムコール、 sched_get_priority_min() システムコール、それから sched_rr_get_interval() システムコールは IEEE Std 1003.1b-93 ("POSIX.1") に適合しています。

SCHED_GET_PRIORITY_MAX (2) March 12, 1998

tail head cat sleep
QR code linking to this page


このマニュアルページサービスについてのご意見は Ben Bullock にお知らせください。 Privacy policy.

This philosophy, in the hands of amateurs, leads to inexplicably mind-numbing botches like the existence of two programs, “head” and “tail,” which print the first part or the last part of a file, depending. Even though their operations are duals of one another, “head” and “tail” are different programs, written by different authors, and take different options!
— The Unix Haters' handbook