<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ComputingAssociate.com</title>
	<atom:link href="http://www.computingassociate.com/wp/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.computingassociate.com/wp</link>
	<description>Official Weblog for ComputingAssociate.com</description>
	<lastBuildDate>Wed, 14 Apr 2010 01:33:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SIPp: Open Source SIP Testing Tools</title>
		<link>http://www.computingassociate.com/wp/?p=17</link>
		<comments>http://www.computingassociate.com/wp/?p=17#comments</comments>
		<pubDate>Wed, 14 Apr 2010 01:28:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Client Projects]]></category>

		<guid isPermaLink="false">http://www.computingassociate.com/wp/?p=17</guid>
		<description><![CDATA[I am trying to get my grip on SIPp. Quite a simple tool but one needs more time to effectively use the XML scripting. The documentations is available here. A good power point presentation is also available from this link.
]]></description>
			<content:encoded><![CDATA[<p>I am trying to get my grip on SIPp. Quite a simple tool but one needs more time to effectively use the XML scripting. The documentations is available <a href="http://sipp.sourceforge.net/doc/reference.html">here</a>. A good power point presentation is also available from this <a href="http://www.pixeltangent.com/other/SIPp_introduction.ppt">link</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.computingassociate.com/wp/?feed=rss2&amp;p=17</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Voice Server Project</title>
		<link>http://www.computingassociate.com/wp/?p=15</link>
		<comments>http://www.computingassociate.com/wp/?p=15#comments</comments>
		<pubDate>Fri, 02 Apr 2010 16:20:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Client Projects]]></category>
		<category><![CDATA[Client_Projects]]></category>

		<guid isPermaLink="false">http://www.computingassociate.com/wp/?p=15</guid>
		<description><![CDATA[These days I am having fun with compliance to RFC-3325 in SIP protocol at a client project. This new project will take me deeper to understand the SIP protocol. Back again to good old days working with DSL based technologies. It looks like this is my &#8220;technological fate&#8221;!
]]></description>
			<content:encoded><![CDATA[<p>These days I am having fun with compliance to <a href="http://www.ietf.org/rfc/rfc3325.txt">RFC-3325</a> in SIP protocol at a client project. This new project will take me deeper to understand the SIP protocol. Back again to good old days working with DSL based technologies. It looks like this is my &#8220;technological fate&#8221;!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.computingassociate.com/wp/?feed=rss2&amp;p=15</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dispatching Hardware Events in a Multi-Threaded Linux Application</title>
		<link>http://www.computingassociate.com/wp/?p=8</link>
		<comments>http://www.computingassociate.com/wp/?p=8#comments</comments>
		<pubDate>Fri, 18 Dec 2009 04:54:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ARTICLES]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.computingassociate.com/wp/?p=8</guid>
		<description><![CDATA[
By: Tony Khoshaba
December 17, 2009

Proper dispatching of hardware interrupt events and other time critical events from Linux Kernel to a multi-threaded application is a challenging issue that requires delicate design consideration both at driver levels as well as application levels. With the programming model discussed in this article we have been able to design a [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 		H1 { margin-bottom: 0.08in } 		H1.western { font-family: "Arial", sans-serif; font-size: 16pt } 		H1.cjk { font-family: "Lucida Sans Unicode"; font-size: 16pt } 		H1.ctl { font-family: "Tahoma"; font-size: 16pt } 		H2 { margin-bottom: 0.08in } 		H2.western { font-family: "Arial", sans-serif; font-size: 14pt; font-style: italic } 		H2.cjk { font-size: 14pt; font-style: italic } 		H2.ctl { font-size: 14pt; font-style: italic } --></p>
<p style="margin-bottom: 0in;"><strong>By: Tony Khoshaba</strong></p>
<p style="margin-bottom: 0in;">December 17, 2009</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">Proper dispatching of hardware interrupt events and other time critical events from Linux Kernel to a multi-threaded application is a challenging issue that requires delicate design consideration both at driver levels as well as application levels. With the programming model discussed in this article we have been able to design a successful robust system that would process a large number of interrupts and other timing events and produce desired reaction time in the system.</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">The basic idea is the use of wait queues at driver level and use of blocking threads on top of the driver for dispatching the events and the use of conditional signaling to propagate the events to other threads.</p>
<p style="margin-bottom: 0in;">
<h2>The Event Drivers</h2>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">The first component in such system is the interrupt or other timing sensitive drivers. Such driver will provide a blocking system read routine that would be unblocked by the interrupt event. To achieve this the following code is needed in the read routine:</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><em>int dev_read(struct file *file, char *buf, size_t count, loff_t *offset)</em></p>
<p style="margin-bottom: 0in;"><em>{</em></p>
<p style="margin-bottom: 0in;"><em>&#8230;</em></p>
<p style="margin-bottom: 0in;"><em>interruptible_sleep_on(&amp;queue);</em></p>
<p style="margin-bottom: 0in;"><em>if(signal_pending(&amp;current)) {</em></p>
<p style="margin-bottom: 0in;"><em>return(-EINTR);</em></p>
<p style="margin-bottom: 0in;"><em>}</em></p>
<p style="margin-bottom: 0in;"><em>&#8230;</em></p>
<p style="margin-bottom: 0in;"><em>}</em></p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">In the interrupt or timer routines a call to</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><em>&#8230;</em></p>
<p style="margin-bottom: 0in;"><em>wake_up(&amp;queue);</em></p>
<p style="margin-bottom: 0in;"><em>&#8230;</em></p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">would be required to initiate the dispatching of the event. The dev_read() routine would also update the necessary data to user memory space if needed.</p>
<p style="margin-bottom: 0in;">
<h2>The Event Dispatching Threads</h2>
<p>The event dispatching thread is a loop that blocks on a read() system call to the associated driver. Once the interrupt event happens, read() unblocks and returns the needed data to application layer. Based on the content of the returned data, appropriate conditional signals are sent to all other threads which are waiting on a conditional signal that is serviced by this event dispatching thread. The event dispaching thread calls</p>
<p><em>&#8230;</em></p>
<p><em>pthread_cond_signal(&amp;cond_id);</em></p>
<p><em>&#8230;</em></p>
<p>for different signals that go to different application threads.</p>
<h2>The Application Threads</h2>
<p>The application threads are loops that are conditional waiting on a signal to service an event. This is achieved by calling</p>
<p><em>&#8230;</em></p>
<p><em>pthread_cond_timedwait(&amp;cond_id, &amp;mutex_id, &amp;timeout);</em></p>
<p><em>&#8230;</em></p>
<p>at the top of the loop. This routine will immediately unblocks upon reception of the corresponding conditional signal from event dispatching threads</p>
<h2>Other Considerations</h2>
<ul>
<li>The application thread need to use timed conditional wait to 	make use proper behavior and processing in the system even if the 	events do not happen.</li>
<li>Use of global mutex_id&#8217;s between dispatching threads and 	application threads is required for better synchronization.</li>
</ul>
<h2>Conclusion</h2>
<p>The programming model described here, if properly used and designed, is capable of handling multiple hardware interrupts and other kernel initiated timing events and processing the corresponding data by multiple thread with independent functonality and it is proven to be working robustly in a complex system such as a Monitor and Hot Standby (MHS) in microwave  radio switches reaching a desirable  almost real-time behavior.</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">
]]></content:encoded>
			<wfw:commentRss>http://www.computingassociate.com/wp/?feed=rss2&amp;p=8</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing ESD Diagnostic Software for Medical Devices</title>
		<link>http://www.computingassociate.com/wp/?p=6</link>
		<comments>http://www.computingassociate.com/wp/?p=6#comments</comments>
		<pubDate>Fri, 25 Sep 2009 01:00:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.computingassociate.com/wp/?p=6</guid>
		<description><![CDATA[By: Tony Khoshaba
Currently, by developing a diagnosis software we are helping our customer to identify issues related to ESD in a medical device. The problem is that there is no good way to identify the source of failed ESD tests and since the condition to pass the ESD tests in medical devices is very strict, [...]]]></description>
			<content:encoded><![CDATA[<p>By: Tony Khoshaba</p>
<p>Currently, by developing a diagnosis software we are helping our customer to identify issues related to ESD in a medical device. The problem is that there is no good way to identify the source of failed ESD tests and since the condition to pass the ESD tests in medical devices is very strict, it is hoped a proper diagnosis software will help identify the problem.</p>
<p>The underlying real-time OS is WIN CE 6.0 R2 and we are trying to develop the diagnostic software at different levels (Bootloader, drivers, and application).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.computingassociate.com/wp/?feed=rss2&amp;p=6</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Official Blog for ComputingAssociate.com</title>
		<link>http://www.computingassociate.com/wp/?p=1</link>
		<comments>http://www.computingassociate.com/wp/?p=1#comments</comments>
		<pubDate>Wed, 23 Sep 2009 04:43:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.computingassociate.com/wp/?p=1</guid>
		<description><![CDATA[Welcome to our blog. Here you will find articles about embedded systems and software development.
]]></description>
			<content:encoded><![CDATA[<p>Welcome to our blog. Here you will find articles about embedded systems and software development.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.computingassociate.com/wp/?feed=rss2&amp;p=1</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

