<?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: Firmware-Specific Bug #1: Race Condition</title>
	<atom:link href="http://embeddedgurus.com/barr-code/2010/02/firmware-specific-bug-1-race-condition/feed/" rel="self" type="application/rss+xml" />
	<link>http://embeddedgurus.com/barr-code/2010/02/firmware-specific-bug-1-race-condition/</link>
	<description>A Blog by Michael Barr</description>
	<lastBuildDate>Fri, 18 May 2012 17:16:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Unintended Acceleration and Other Embedded Software Bugs &#171; Barr Code</title>
		<link>http://embeddedgurus.com/barr-code/2010/02/firmware-specific-bug-1-race-condition/comment-page-1/#comment-21068</link>
		<dc:creator>Unintended Acceleration and Other Embedded Software Bugs &#171; Barr Code</dc:creator>
		<pubDate>Sun, 06 Mar 2011 12:20:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2010/02/11/firmware-specific-bug-1-race-condition/#comment-21068</guid>
		<description>[...] software control flow.&#8221; (Appendix A, p. 11) NASA also spent time simulating possible race conditions due to worrisome &#8220;recursively nested interrupt masking&#8221; (pp, 44-46); note, though, that [...]</description>
		<content:encoded><![CDATA[<p>[...] software control flow.&#8221; (Appendix A, p. 11) NASA also spent time simulating possible race conditions due to worrisome &#8220;recursively nested interrupt masking&#8221; (pp, 44-46); note, though, that [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: IT student</title>
		<link>http://embeddedgurus.com/barr-code/2010/02/firmware-specific-bug-1-race-condition/comment-page-1/#comment-717</link>
		<dc:creator>IT student</dc:creator>
		<pubDate>Sun, 25 Apr 2010 20:28:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2010/02/11/firmware-specific-bug-1-race-condition/#comment-717</guid>
		<description>Race condition could be the cause of Toyota&#039;s unintended acceleration problems. The problem may be  related to software controlled mutual exclusion as opposed to more expensive hardware controlled mutual exclusion. NASA had this problem in the late 70&#039;s.</description>
		<content:encoded><![CDATA[<p>Race condition could be the cause of Toyota&#8217;s unintended acceleration problems. The problem may be  related to software controlled mutual exclusion as opposed to more expensive hardware controlled mutual exclusion. NASA had this problem in the late 70&#8242;s.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miro Samek</title>
		<link>http://embeddedgurus.com/barr-code/2010/02/firmware-specific-bug-1-race-condition/comment-page-1/#comment-133</link>
		<dc:creator>Miro Samek</dc:creator>
		<pubDate>Wed, 03 Mar 2010 03:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2010/02/11/firmware-specific-bug-1-race-condition/#comment-133</guid>
		<description>That&#039;s an interesting observation. An event-driven framework can reduce (even eliminate) the need for sharing resources and replace it with sharing events that are managed by the framework in a thread-safe manner. Without sharing resources, race conditions won&#039;t happen. However, event-driven paradigm is perhaps more vulnerable to deadlocks than traditional sequential programming style. If an event is lost or simply forgotten to be posted, the application might freeze. I plan to write about race conditions and such deadlocks in my &quot;state space&quot; blog.  Stay tuned...</description>
		<content:encoded><![CDATA[<p>That&#8217;s an interesting observation. An event-driven framework can reduce (even eliminate) the need for sharing resources and replace it with sharing events that are managed by the framework in a thread-safe manner. Without sharing resources, race conditions won&#8217;t happen. However, event-driven paradigm is perhaps more vulnerable to deadlocks than traditional sequential programming style. If an event is lost or simply forgotten to be posted, the application might freeze. I plan to write about race conditions and such deadlocks in my &#8220;state space&#8221; blog.  Stay tuned&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ram C.</title>
		<link>http://embeddedgurus.com/barr-code/2010/02/firmware-specific-bug-1-race-condition/comment-page-1/#comment-128</link>
		<dc:creator>Ram C.</dc:creator>
		<pubDate>Thu, 25 Feb 2010 16:01:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2010/02/11/firmware-specific-bug-1-race-condition/#comment-128</guid>
		<description>Now, if one were to use non-blocking event driven framework instead of a conventional OS/RTOS, would it not make life easier?</description>
		<content:encoded><![CDATA[<p>Now, if one were to use non-blocking event driven framework instead of a conventional OS/RTOS, would it not make life easier?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ram C.</title>
		<link>http://embeddedgurus.com/barr-code/2010/02/firmware-specific-bug-1-race-condition/comment-page-1/#comment-127</link>
		<dc:creator>Ram C.</dc:creator>
		<pubDate>Wed, 24 Feb 2010 13:13:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2010/02/11/firmware-specific-bug-1-race-condition/#comment-127</guid>
		<description>Great article on one of the trickiest class of problems for embedded engineers. Michael how about a follow up article on avoiding (by using good system design practices) or detecting and resolving deadlocks in code?</description>
		<content:encoded><![CDATA[<p>Great article on one of the trickiest class of problems for embedded engineers. Michael how about a follow up article on avoiding (by using good system design practices) or detecting and resolving deadlocks in code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://embeddedgurus.com/barr-code/2010/02/firmware-specific-bug-1-race-condition/comment-page-1/#comment-126</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 18 Feb 2010 20:29:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2010/02/11/firmware-specific-bug-1-race-condition/#comment-126</guid>
		<description>As both a hardware designer and a software designer I once had to debug a race condition in a corner case in the hardware.  The target system was running in a mode where the control processor was running at a very high clock speed and the peripheral at a low clock speed (clock ratio were of course programmable).

First, the processor wrote to the peripheral instructing it to start.  This command was buffered in the synchronziation logic between the clock domains.  Then, the processor read the status flag. But the read signal was not synchronized. So the processor thought the peripheral was already finished (actually, it hadn&#039;t even started) causing the loss of the buffer of data the peripheral should be working on.</description>
		<content:encoded><![CDATA[<p>As both a hardware designer and a software designer I once had to debug a race condition in a corner case in the hardware.  The target system was running in a mode where the control processor was running at a very high clock speed and the peripheral at a low clock speed (clock ratio were of course programmable).</p>
<p>First, the processor wrote to the peripheral instructing it to start.  This command was buffered in the synchronziation logic between the clock domains.  Then, the processor read the status flag. But the read signal was not synchronized. So the processor thought the peripheral was already finished (actually, it hadn&#39;t even started) causing the loss of the buffer of data the peripheral should be working on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://embeddedgurus.com/barr-code/2010/02/firmware-specific-bug-1-race-condition/comment-page-1/#comment-125</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 18 Feb 2010 16:34:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2010/02/11/firmware-specific-bug-1-race-condition/#comment-125</guid>
		<description>A common race condition I have seen involves communication between an ISR and main() or a task function by use of a global flag variable.  The ISR sets the flag and the other code tests and then clears it.Too many developers either forget to disable the interrupt in main() or think the clear will always be atomic.  Embedded programmers should never rely on the specific timings of instructions of their current processor.</description>
		<content:encoded><![CDATA[<p>A common race condition I have seen involves communication between an ISR and main() or a task function by use of a global flag variable.  The ISR sets the flag and the other code tests and then clears it.Too many developers either forget to disable the interrupt in main() or think the clear will always be atomic.  Embedded programmers should never rely on the specific timings of instructions of their current processor.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://embeddedgurus.com/barr-code/2010/02/firmware-specific-bug-1-race-condition/comment-page-1/#comment-124</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 17 Feb 2010 15:54:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2010/02/11/firmware-specific-bug-1-race-condition/#comment-124</guid>
		<description>Might mention deadlock as a possible result of all those mutexes.  Can be alkmost as ahrd to fix as the problem they are introduced to solve.</description>
		<content:encoded><![CDATA[<p>Might mention deadlock as a possible result of all those mutexes.  Can be alkmost as ahrd to fix as the problem they are introduced to solve.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://embeddedgurus.com/barr-code/2010/02/firmware-specific-bug-1-race-condition/comment-page-1/#comment-123</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 17 Feb 2010 08:33:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2010/02/11/firmware-specific-bug-1-race-condition/#comment-123</guid>
		<description>Best practice: don&#039;t share data, encapsulate it in one thread only and provide a message-based interface to it.</description>
		<content:encoded><![CDATA[<p>Best practice: don&#39;t share data, encapsulate it in one thread only and provide a message-based interface to it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J. Scott</title>
		<link>http://embeddedgurus.com/barr-code/2010/02/firmware-specific-bug-1-race-condition/comment-page-1/#comment-122</link>
		<dc:creator>J. Scott</dc:creator>
		<pubDate>Tue, 16 Feb 2010 19:00:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2010/02/11/firmware-specific-bug-1-race-condition/#comment-122</guid>
		<description>Your definition of a race condition is too narrow in scope and doesn&#039;t address race conditions caused by an unexpected sequence of inputs.</description>
		<content:encoded><![CDATA[<p>Your definition of a race condition is too narrow in scope and doesn&#39;t address race conditions caused by an unexpected sequence of inputs.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

