<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Worst-Case Context Switch Times by RTOS</title>
	<atom:link href="http://embeddedgurus.com/barr-code/2010/01/worst-case-context-switch-times-by-rtos/feed/" rel="self" type="application/rss+xml" />
	<link>http://embeddedgurus.com/barr-code/2010/01/worst-case-context-switch-times-by-rtos/</link>
	<description>A Blog by Michael Barr</description>
	<lastBuildDate>Wed, 18 Aug 2010 18:39:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Michael Barr</title>
		<link>http://embeddedgurus.com/barr-code/2010/01/worst-case-context-switch-times-by-rtos/comment-page-1/#comment-103</link>
		<dc:creator>Michael Barr</dc:creator>
		<pubDate>Wed, 13 Jan 2010 14:51:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2010/01/06/worst-case-context-switch-times-by-rtos/#comment-103</guid>
		<description>Andrew,

While it is likely on many hardware architectures that the context switch will be constant time, or close to it, I disagree that this should be an important design goal for an RTOS developer.  First, because RTOS makers don&#039;t control the hardware settings on which they are run.  Data caching is one simple way in which the prior context might be brought into the registers much faster than worst-case.

Additionally, RMA is necessarily pessimistic.  Application developers who care about ensuring all deadlines are met will never stop caring about worst-case times.  Still, making parts of the code run slower than needed is never a good idea.  Any spare cycles that pessimistic RMA counts as unavailable can still be used in the field--by low priority tasks that don&#039;t have any critical deadlines to meet.

If you want completely deterministic application behavior, you&#039;d do well to ditch the RTOS altogether.  Low jitter functionality should be placed into hardware directly (e.g., an FPGA), executed in interrupt handlers, or run as part of a &quot;cyclic executive&quot; backgroun loop with deterministic timing.  An RTOS can support provability/predictability with respect to deadlines with RMA.  But an RTOS will never give you determinism.

Cheers,
Mike</description>
		<content:encoded><![CDATA[<p>Andrew,</p>
<p>While it is likely on many hardware architectures that the context switch will be constant time, or close to it, I disagree that this should be an important design goal for an RTOS developer.  First, because RTOS makers don&#39;t control the hardware settings on which they are run.  Data caching is one simple way in which the prior context might be brought into the registers much faster than worst-case.</p>
<p>Additionally, RMA is necessarily pessimistic.  Application developers who care about ensuring all deadlines are met will never stop caring about worst-case times.  Still, making parts of the code run slower than needed is never a good idea.  Any spare cycles that pessimistic RMA counts as unavailable can still be used in the field&#8211;by low priority tasks that don&#39;t have any critical deadlines to meet.</p>
<p>If you want completely deterministic application behavior, you&#39;d do well to ditch the RTOS altogether.  Low jitter functionality should be placed into hardware directly (e.g., an FPGA), executed in interrupt handlers, or run as part of a &quot;cyclic executive&quot; backgroun loop with deterministic timing.  An RTOS can support provability/predictability with respect to deadlines with RMA.  But an RTOS will never give you determinism.</p>
<p>Cheers,<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://embeddedgurus.com/barr-code/2010/01/worst-case-context-switch-times-by-rtos/comment-page-1/#comment-102</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Wed, 13 Jan 2010 12:32:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2010/01/06/worst-case-context-switch-times-by-rtos/#comment-102</guid>
		<description>It&#039;s a really good design goal for an RTOS to strive for constant execution time (best-case = worst-case) for context switches. This means that the RMA is not unnecessarily pessimistic.I&#039;ve previously worked on the SSX5 RTOS (now merged into RTA-OSEK), which did manage to get very close to constant execution time.</description>
		<content:encoded><![CDATA[<p>It&#39;s a really good design goal for an RTOS to strive for constant execution time (best-case = worst-case) for context switches. This means that the RMA is not unnecessarily pessimistic.I&#39;ve previously worked on the SSX5 RTOS (now merged into RTA-OSEK), which did manage to get very close to constant execution time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GregK</title>
		<link>http://embeddedgurus.com/barr-code/2010/01/worst-case-context-switch-times-by-rtos/comment-page-1/#comment-101</link>
		<dc:creator>GregK</dc:creator>
		<pubDate>Thu, 07 Jan 2010 14:22:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2010/01/06/worst-case-context-switch-times-by-rtos/#comment-101</guid>
		<description>Contex switch is in most cases not really the most important thing in RTOS design. It is quite probably that before you finish software design (with RTOS) there will be another version of you chip, with 10% faster cpu clock and less power consumption.context switchs are fairly comparable for different RTOS and in more case not really important for design. Let&#039;s try calculate time spend on &quot;switching context&quot; and time spending in idle or in doing job.</description>
		<content:encoded><![CDATA[<p>Contex switch is in most cases not really the most important thing in RTOS design. It is quite probably that before you finish software design (with RTOS) there will be another version of you chip, with 10% faster cpu clock and less power consumption.context switchs are fairly comparable for different RTOS and in more case not really important for design. Let&#39;s try calculate time spend on &quot;switching context&quot; and time spending in idle or in doing job.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
