<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://uc2.h2np.net/index.php?action=history&amp;feed=atom&amp;title=%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%83%A9%E3%82%A4%E3%82%B9%E3%81%AE%E5%80%A4%E3%82%92%E8%A8%88%E6%B8%AC%E3%81%99%E3%82%8B</id>
	<title>プロセスのタイムスライスの値を計測する - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://uc2.h2np.net/index.php?action=history&amp;feed=atom&amp;title=%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%83%A9%E3%82%A4%E3%82%B9%E3%81%AE%E5%80%A4%E3%82%92%E8%A8%88%E6%B8%AC%E3%81%99%E3%82%8B"/>
	<link rel="alternate" type="text/html" href="https://uc2.h2np.net/index.php?title=%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%83%A9%E3%82%A4%E3%82%B9%E3%81%AE%E5%80%A4%E3%82%92%E8%A8%88%E6%B8%AC%E3%81%99%E3%82%8B&amp;action=history"/>
	<updated>2026-05-01T00:03:30Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://uc2.h2np.net/index.php?title=%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%83%A9%E3%82%A4%E3%82%B9%E3%81%AE%E5%80%A4%E3%82%92%E8%A8%88%E6%B8%AC%E3%81%99%E3%82%8B&amp;diff=1569&amp;oldid=prev</id>
		<title>Hironobu: /* タイムスライス */</title>
		<link rel="alternate" type="text/html" href="https://uc2.h2np.net/index.php?title=%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%83%A9%E3%82%A4%E3%82%B9%E3%81%AE%E5%80%A4%E3%82%92%E8%A8%88%E6%B8%AC%E3%81%99%E3%82%8B&amp;diff=1569&amp;oldid=prev"/>
		<updated>2019-03-12T10:51:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;タイムスライス&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2019年3月12日 (火) 10:51時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;2行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;2行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;タイムシェアリング方式（時分割方式）でCPUにプロセスを割り当てる単位時間のことをタイムスライス(Time Slice)あるいはタイムクアンタム (Time Quantum)と呼びます([https://uc2.h2np.net/index.php/%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E7%AE%A1%E7%90%86#.E5.9F.BA.E6.9C.AC.E7.9A.84.E3.81.AA.E3.82.B9.E3.82.B1.E3.82.B8.E3.83.A5.E3.83.BC.E3.83.AA.E3.83.B3.E3.82.B0.E6.96.B9.E5.BC.8F こちらも参照])。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;タイムシェアリング方式（時分割方式）でCPUにプロセスを割り当てる単位時間のことをタイムスライス(Time Slice)あるいはタイムクアンタム (Time Quantum)と呼びます([https://uc2.h2np.net/index.php/%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E7%AE%A1%E7%90%86#.E5.9F.BA.E6.9C.AC.E7.9A.84.E3.81.AA.E3.82.B9.E3.82.B1.E3.82.B8.E3.83.A5.E3.83.BC.E3.83.AA.E3.83.B3.E3.82.B0.E6.96.B9.E5.BC.8F こちらも参照])。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;タイムスライスはスケジューリング・ポリシー及びいくつかのカーネルのパラメータによっても変化します。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;タイムスライスはスケジューリング・ポリシー及びいくつかのカーネルのパラメータによっても変化します。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Linuxカーネルのスケジューリング・ポリシーにはLinuxの独自優先順位 ( SCHED_OTHER ) 、FIFO ( SCHED_FIFO ) 、RR ( SCHED_RR )、バッチ ( SCHED_BATCH )、アイドル ( SCHED_IDLE )&amp;lt;ref&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;バージョン &lt;/del&gt;3.14 以降ではデッドラインスケジューリングポリシー (SCHED_DEADLINE) が組み込まれていますが、Debian 18.04.2 LTSで提供されているLinux version 4.15.0-46-generic では提供されていないのでここでは取り上げません。&amp;lt;/ref&amp;gt;等などあります。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Linuxカーネルのスケジューリング・ポリシーにはLinuxの独自優先順位 ( SCHED_OTHER ) 、FIFO ( SCHED_FIFO ) 、RR ( SCHED_RR )、バッチ ( SCHED_BATCH )、アイドル ( SCHED_IDLE )&amp;lt;ref&amp;gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Linux カーネルのversion &lt;/ins&gt;3.14 以降ではデッドラインスケジューリングポリシー (SCHED_DEADLINE) が組み込まれていますが、Debian 18.04.2 LTSで提供されているLinux version 4.15.0-46-generic では提供されていないのでここでは取り上げません。&amp;lt;/ref&amp;gt;等などあります。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ここではどのような値を実際に取っているのか観察してみましょう。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ここではどのような値を実際に取っているのか観察してみましょう。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hironobu</name></author>
	</entry>
	<entry>
		<id>https://uc2.h2np.net/index.php?title=%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%83%A9%E3%82%A4%E3%82%B9%E3%81%AE%E5%80%A4%E3%82%92%E8%A8%88%E6%B8%AC%E3%81%99%E3%82%8B&amp;diff=1568&amp;oldid=prev</id>
		<title>Hironobu: /* タイムスライス */</title>
		<link rel="alternate" type="text/html" href="https://uc2.h2np.net/index.php?title=%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%83%A9%E3%82%A4%E3%82%B9%E3%81%AE%E5%80%A4%E3%82%92%E8%A8%88%E6%B8%AC%E3%81%99%E3%82%8B&amp;diff=1568&amp;oldid=prev"/>
		<updated>2019-03-12T10:49:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;タイムスライス&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2019年3月12日 (火) 10:49時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;2行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;2行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;タイムシェアリング方式（時分割方式）でCPUにプロセスを割り当てる単位時間のことをタイムスライス(Time Slice)あるいはタイムクアンタム (Time Quantum)と呼びます([https://uc2.h2np.net/index.php/%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E7%AE%A1%E7%90%86#.E5.9F.BA.E6.9C.AC.E7.9A.84.E3.81.AA.E3.82.B9.E3.82.B1.E3.82.B8.E3.83.A5.E3.83.BC.E3.83.AA.E3.83.B3.E3.82.B0.E6.96.B9.E5.BC.8F こちらも参照])。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;タイムシェアリング方式（時分割方式）でCPUにプロセスを割り当てる単位時間のことをタイムスライス(Time Slice)あるいはタイムクアンタム (Time Quantum)と呼びます([https://uc2.h2np.net/index.php/%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E7%AE%A1%E7%90%86#.E5.9F.BA.E6.9C.AC.E7.9A.84.E3.81.AA.E3.82.B9.E3.82.B1.E3.82.B8.E3.83.A5.E3.83.BC.E3.83.AA.E3.83.B3.E3.82.B0.E6.96.B9.E5.BC.8F こちらも参照])。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;タイムスライスはスケジューリング・ポリシー及びいくつかのカーネルのパラメータによっても変化します。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;タイムスライスはスケジューリング・ポリシー及びいくつかのカーネルのパラメータによっても変化します。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Linuxカーネルのスケジューリング・ポリシーにはLinuxの独自優先順位 ( SCHED_OTHER ) 、FIFO ( SCHED_FIFO ) 、RR ( SCHED_RR )、バッチ ( SCHED_BATCH )、アイドル ( SCHED_IDLE )&amp;lt;ref&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;カーネル4&lt;/del&gt;.4.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0ではこの通りですが、将来にこれ以外にも増える可能性はあります。&lt;/del&gt;&amp;lt;/ref&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;があります。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Linuxカーネルのスケジューリング・ポリシーにはLinuxの独自優先順位 ( SCHED_OTHER ) 、FIFO ( SCHED_FIFO ) 、RR ( SCHED_RR )、バッチ ( SCHED_BATCH )、アイドル ( SCHED_IDLE )&amp;lt;ref&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;バージョン 3&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;14 以降ではデッドラインスケジューリングポリシー (SCHED_DEADLINE) が組み込まれていますが、Debian 18.04.2 LTSで提供されているLinux version &lt;/ins&gt;4.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;15.0-46-generic では提供されていないのでここでは取り上げません。&lt;/ins&gt;&amp;lt;/ref&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;等などあります。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ここではどのような値を実際に取っているのか観察してみましょう。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ここではどのような値を実際に取っているのか観察してみましょう。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hironobu</name></author>
	</entry>
	<entry>
		<id>https://uc2.h2np.net/index.php?title=%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%83%A9%E3%82%A4%E3%82%B9%E3%81%AE%E5%80%A4%E3%82%92%E8%A8%88%E6%B8%AC%E3%81%99%E3%82%8B&amp;diff=1563&amp;oldid=prev</id>
		<title>Hironobu: /* chrtの確認 */</title>
		<link rel="alternate" type="text/html" href="https://uc2.h2np.net/index.php?title=%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%83%A9%E3%82%A4%E3%82%B9%E3%81%AE%E5%80%A4%E3%82%92%E8%A8%88%E6%B8%AC%E3%81%99%E3%82%8B&amp;diff=1563&amp;oldid=prev"/>
		<updated>2019-03-12T10:31:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;chrtの確認&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2019年3月12日 (火) 10:31時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot;&gt;42行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;42行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;今回はタイムスライスを表示する短いプログラムを作成し、それをchrtを使って変化させてみます。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;今回はタイムスライスの値を表示する短いプログラムを作成し、それをchrtを使って変化させてみます。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;その際のコマンドラインは次のようになります。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;試してみるコマンドラインは次のような形式になります。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hironobu</name></author>
	</entry>
	<entry>
		<id>https://uc2.h2np.net/index.php?title=%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%83%A9%E3%82%A4%E3%82%B9%E3%81%AE%E5%80%A4%E3%82%92%E8%A8%88%E6%B8%AC%E3%81%99%E3%82%8B&amp;diff=1562&amp;oldid=prev</id>
		<title>Hironobu: /* chrtの確認 */</title>
		<link rel="alternate" type="text/html" href="https://uc2.h2np.net/index.php?title=%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%83%A9%E3%82%A4%E3%82%B9%E3%81%AE%E5%80%A4%E3%82%92%E8%A8%88%E6%B8%AC%E3%81%99%E3%82%8B&amp;diff=1562&amp;oldid=prev"/>
		<updated>2019-03-12T10:29:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;chrtの確認&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2019年3月12日 (火) 10:29時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot;&gt;8行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;8行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== chrtの確認 ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== chrtの確認 ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;まずコマンドchrtを使ってカーネルにはどのようなスケジューラと、スケジューラが取るプライオリティの値を確認してみます。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;まずコマンド[[chrt]]を使ってカーネルにはどのようなスケジューラと、スケジューラが取るプライオリティの値を確認してみます。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre class=&amp;quot;bash&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre class=&amp;quot;bash&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% chrt -m&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% chrt -m&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hironobu</name></author>
	</entry>
	<entry>
		<id>https://uc2.h2np.net/index.php?title=%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%83%A9%E3%82%A4%E3%82%B9%E3%81%AE%E5%80%A4%E3%82%92%E8%A8%88%E6%B8%AC%E3%81%99%E3%82%8B&amp;diff=1559&amp;oldid=prev</id>
		<title>Hironobu: ページの作成:「= タイムスライス = タイムシェアリング方式（時分割方式）でCPUにプロセスを割り当てる単位時間のことをタイムスライス(Time...」</title>
		<link rel="alternate" type="text/html" href="https://uc2.h2np.net/index.php?title=%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%81%AE%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%83%A9%E3%82%A4%E3%82%B9%E3%81%AE%E5%80%A4%E3%82%92%E8%A8%88%E6%B8%AC%E3%81%99%E3%82%8B&amp;diff=1559&amp;oldid=prev"/>
		<updated>2019-03-12T10:25:51Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「= タイムスライス = タイムシェアリング方式（時分割方式）でCPUにプロセスを割り当てる単位時間のことをタイムスライス(Time...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= タイムスライス =&lt;br /&gt;
タイムシェアリング方式（時分割方式）でCPUにプロセスを割り当てる単位時間のことをタイムスライス(Time Slice)あるいはタイムクアンタム (Time Quantum)と呼びます([https://uc2.h2np.net/index.php/%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E7%AE%A1%E7%90%86#.E5.9F.BA.E6.9C.AC.E7.9A.84.E3.81.AA.E3.82.B9.E3.82.B1.E3.82.B8.E3.83.A5.E3.83.BC.E3.83.AA.E3.83.B3.E3.82.B0.E6.96.B9.E5.BC.8F こちらも参照])。&lt;br /&gt;
タイムスライスはスケジューリング・ポリシー及びいくつかのカーネルのパラメータによっても変化します。&lt;br /&gt;
Linuxカーネルのスケジューリング・ポリシーにはLinuxの独自優先順位 ( SCHED_OTHER ) 、FIFO ( SCHED_FIFO ) 、RR ( SCHED_RR )、バッチ ( SCHED_BATCH )、アイドル ( SCHED_IDLE )&amp;lt;ref&amp;gt;カーネル4.4.0ではこの通りですが、将来にこれ以外にも増える可能性はあります。&amp;lt;/ref&amp;gt;があります。&lt;br /&gt;
ここではどのような値を実際に取っているのか観察してみましょう。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== chrtの確認 ==&lt;br /&gt;
&lt;br /&gt;
まずコマンドchrtを使ってカーネルにはどのようなスケジューラと、スケジューラが取るプライオリティの値を確認してみます。&lt;br /&gt;
&amp;lt;pre class=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
% chrt -m&lt;br /&gt;
SCHED_OTHER min/max priority	: 0/0&lt;br /&gt;
SCHED_FIFO min/max priority	: 1/99&lt;br /&gt;
SCHED_RR min/max priority	: 1/99&lt;br /&gt;
SCHED_BATCH min/max priority	: 0/0&lt;br /&gt;
SCHED_IDLE min/max priority	: 0/0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
コマンド chrt のオプションは次の通りです。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
% chrt --help&lt;br /&gt;
Show or change the real-time scheduling attributes of a process.&lt;br /&gt;
&lt;br /&gt;
Set policy:&lt;br /&gt;
 chrt [options] &amp;lt;priority&amp;gt; &amp;lt;command&amp;gt; [&amp;lt;arg&amp;gt;...]&lt;br /&gt;
 chrt [options] -p &amp;lt;priority&amp;gt; &amp;lt;pid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get policy:&lt;br /&gt;
 chrt [options] -p &amp;lt;pid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Policy options:&lt;br /&gt;
 -b, --batch          set policy to SCHED_BATCH&lt;br /&gt;
 -f, --fifo           set policy to SCHED_FIFO&lt;br /&gt;
 -i, --idle           set policy to SCHED_IDLE&lt;br /&gt;
 -o, --other          set policy to SCHED_OTHER&lt;br /&gt;
 -r, --rr             set policy to SCHED_RR (default)&lt;br /&gt;
.....&lt;br /&gt;
For more details see chrt(1).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
今回はタイムスライスを表示する短いプログラムを作成し、それをchrtを使って変化させてみます。&lt;br /&gt;
その際のコマンドラインは次のようになります。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
% sudo chrt &amp;lt;オプション&amp;gt; &amp;lt;オプションのもつ最小プライオリティ値&amp;gt; ./a.out&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== タイムスライスを表示するプログラム ==&lt;br /&gt;
&lt;br /&gt;
プロセスに与えられているタイムスライスの値を表示するプログラムは次の通りです。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
% cat rr.c&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sched.h&amp;gt;&lt;br /&gt;
void main(void) {&lt;br /&gt;
  struct timespec tp;&lt;br /&gt;
  sched_rr_get_interval(getpid(),&amp;amp;tp); /* timeslice of this process */&lt;br /&gt;
  printf(&amp;quot;%.2fms\n&amp;quot;,tp.tv_nsec/1000000.0);&lt;br /&gt;
}&lt;br /&gt;
% gcc -O rr.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
システムコール[http://man7.org/linux/man-pages/man2/sched_rr_get_interval.2.html sched_rr_get_interval(2)]を使います。&lt;br /&gt;
システムのもつタイムスライスの時間は /proc/sys/kernel/sched_rr_timeslice_ms に入っています。デフォルトでは100 (100ms) ですがシステムによって変化します。&lt;br /&gt;
実際にプロセスに割り当てられているタイムスライスの値はsched_rr_timeslice_msで示される値そのものではありません。&lt;br /&gt;
たとえばデスクトップ環境として使用しているDebian 18.04.2 LTSでは次のようになりました。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cat /proc/version&lt;br /&gt;
Linux version 4.15.0-46-generic (buildd@lgw01-amd64-038) (gcc version 7.3.0&lt;br /&gt;
 (Ubuntu 7.3.0-16ubuntu3)) #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019&lt;br /&gt;
$ cat /proc/sys/kernel/sched_rr_timeslice_ms &lt;br /&gt;
100&lt;br /&gt;
$ ./a.out &lt;br /&gt;
20.00ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== どう変化するのか実験 == &lt;br /&gt;
&lt;br /&gt;
まずシステムのタイムスライスの値をデフォルト(100ms)の状態でテストしてみます。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ./a.out&lt;br /&gt;
20.00ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
値は20msでした。この値は実際にこのプロセスに与えられたタイムスライスの値です。時間はミリ秒です。&lt;br /&gt;
ではchrtを使ってスケジューリング・ポリシーを変更してみます。優先度はそのスケジューリング・ポリシーのもつ最低の値を与えています。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cat /proc/sys/kernel/sched_rr_timeslice_ms&lt;br /&gt;
100&lt;br /&gt;
$ ./a.out&lt;br /&gt;
20.00ms&lt;br /&gt;
$ sudo chrt -v -o 0 ./a.out&lt;br /&gt;
pid 8703&amp;#039;s new scheduling policy: SCHED_OTHER&lt;br /&gt;
pid 8703&amp;#039;s new scheduling priority: 0&lt;br /&gt;
20.00ms&lt;br /&gt;
$ sudo chrt -v -b 0 ./a.out&lt;br /&gt;
pid 8705&amp;#039;s new scheduling policy: SCHED_BATCH&lt;br /&gt;
pid 8705&amp;#039;s new scheduling priority: 0&lt;br /&gt;
20.00ms&lt;br /&gt;
$ sudo chrt -v -i 0 ./a.out&lt;br /&gt;
pid 8707&amp;#039;s new scheduling policy: SCHED_IDLE&lt;br /&gt;
pid 8707&amp;#039;s new scheduling priority: 0&lt;br /&gt;
20.00ms&lt;br /&gt;
$ sudo chrt -v -r 1 ./a.out&lt;br /&gt;
pid 8709&amp;#039;s new scheduling policy: SCHED_RR&lt;br /&gt;
pid 8709&amp;#039;s new scheduling priority: 1&lt;br /&gt;
100.00ms&lt;br /&gt;
$ sudo chrt -v -f 1 ./a.out&lt;br /&gt;
pid 8711&amp;#039;s new scheduling policy: SCHED_FIFO&lt;br /&gt;
pid 8711&amp;#039;s new scheduling priority: 1&lt;br /&gt;
0.00ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
システムで設定しているデフォルトのタイムスライスは100msです。&lt;br /&gt;
デフォルト（何もせずに）実行した際のタイムスライスの値は20.00ms、そしてSCHED_OTHERも20.00msです。これはLinuxのカーネルのデフォルトのスケジューリング・ポリシーがSCHED_OTHERなので一致しています。ここではSCHED_OTHER、SCHED_BATCH、SCHED_IDLEは20.00msですが、繰り返し実行しているとSCHED_BATCHが4.00msとなるケースもあり、SCHED_BATCHは内部の諸条件によって変化しているのが観測できます。&lt;br /&gt;
SCHED_RRは100.00msです。これはsched_rr_timeslice_msの値が反映されています。&lt;br /&gt;
SCHED_FIFOは常に0.00ms、つまりタイムスライスの値が設定されません。最優先でCPUに割り当てられ一度割り当てられたらば、タイムシアリング処理は行われず、その処理が終わるまでCPUが割り当て続けるということになります。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 脚注 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[プロセス管理]]&lt;br /&gt;
もしくは&lt;br /&gt;
[[目次]]&lt;br /&gt;
へ&lt;/div&gt;</summary>
		<author><name>Hironobu</name></author>
	</entry>
</feed>