Warning: include_once(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /home/users/2/moriya-h5/web/confrage/java/thread/scheduling/scheduling.html on line 2

Warning: include_once(http://www.confrage.com/bin/header.php): failed to open stream: no suitable wrapper could be found in /home/users/2/moriya-h5/web/confrage/java/thread/scheduling/scheduling.html on line 2

Warning: include_once(): Failed opening 'http://www.confrage.com/bin/header.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/java/thread/scheduling/scheduling.html on line 2
スケジューリング | Java | 株式会社CONFRAGE
Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/menu.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/java/thread/scheduling/scheduling.html on line 17

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/menu.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/java/thread/scheduling/scheduling.html on line 17
スケジューリング
スケジューリングとは、複数存在するスレッドの優先順位を、それぞれのスレッドに付けられた優先度によって決めることを言います。
優先度はそれぞれのスレッドが持っており、MAX_PRIORITY~MIN_PRIORITY(10~1)までがあります。
数値が大きいほうが優先度が高いことになります。

スレッド生成時、スレッドの優先度はNORM_PRIORITY(5)が設定されます。
スレッドの優先度は setPriority(int i) メソッドによって変更することができます。
変更できる値は1~10の範囲内で、それ以外を指定した場合は例外がthrowされますので必ず1~10の範囲内の数値を指定します。
逆に、現在の優先度を取得するには getPriority() メソッドで取得することができます。

スレッドの優先順位はJVMが決めますが、これはあくまでも優先順位であって、優先順位が高いスレッドがCPU割り当てられる頻度が高いだけで、優先順位が低いスレッドも並行して実行されるようになっています。

Back to top

Information

Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/side_bar.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/java/thread/scheduling/scheduling.html on line 62

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/side_bar.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/java/thread/scheduling/scheduling.html on line 62

Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/seo.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/java/thread/scheduling/scheduling.html on line 71

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/seo.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/java/thread/scheduling/scheduling.html on line 71