<?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/"
	>

<channel>
	<title>Tuxology</title>
	<atom:link href="http://tuxology.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://tuxology.net</link>
	<description>A Linux embedded, kernel and training blog</description>
	<pubDate>Mon, 22 Jun 2009 15:26:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Do Androids Dreap of Electronic Sheep?</title>
		<link>http://tuxology.net/2009/05/24/do-androids-dreap-of-electronic-sheep/</link>
		<comments>http://tuxology.net/2009/05/24/do-androids-dreap-of-electronic-sheep/#comments</comments>
		<pubDate>Sun, 24 May 2009 14:06:46 +0000</pubDate>
		<dc:creator>Tuxology team</dc:creator>
		
		<category><![CDATA[Applications]]></category>

		<category><![CDATA[Embedded]]></category>

		<category><![CDATA[Herzelinux]]></category>

		<category><![CDATA[Kernel]]></category>

		<category><![CDATA[Lectures]]></category>

		<category><![CDATA[News]]></category>

		<category><![CDATA[Video]]></category>

		<category><![CDATA[android]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[mobile]]></category>

		<category><![CDATA[OHA]]></category>

		<guid isPermaLink="false">http://tuxology.net/?p=287</guid>
		<description><![CDATA[We&#8217;ve added a new lecture about Android, the Open Source mobile stack, from Google and the Open handset Alliance to our list of available lectures.
You are all invited to grab the slides or watch the video (in Hebrew only right now, sorry) at the lecture page.
]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve added a new lecture about Android, the Open Source mobile stack, from Google and the Open handset Alliance to our list of available lectures.</p>
<p>You are all invited to grab the slides or watch the video (in Hebrew only right now, sorry) at the <a href="http://tuxology.net/lectures/google-android-open-source-phone-stack/">lecture page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tuxology.net/2009/05/24/do-androids-dreap-of-electronic-sheep/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Helping The Compiler Help You</title>
		<link>http://tuxology.net/2009/05/10/helping-the-compiler-help-you/</link>
		<comments>http://tuxology.net/2009/05/10/helping-the-compiler-help-you/#comments</comments>
		<pubDate>Sun, 10 May 2009 15:20:15 +0000</pubDate>
		<dc:creator>Tuxology team</dc:creator>
		
		<category><![CDATA[Applications]]></category>

		<category><![CDATA[Hardware]]></category>

		<category><![CDATA[Optimization]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[builtin]]></category>

		<category><![CDATA[cache]]></category>

		<category><![CDATA[cold function]]></category>

		<category><![CDATA[compiler]]></category>

		<category><![CDATA[g++]]></category>

		<category><![CDATA[gcc]]></category>

		<category><![CDATA[hot function]]></category>

		<category><![CDATA[likely]]></category>

		<category><![CDATA[perfomance]]></category>

		<category><![CDATA[prefetch]]></category>

		<category><![CDATA[pure function]]></category>

		<category><![CDATA[unlikely]]></category>

		<guid isPermaLink="false">http://tuxology.net/?p=250</guid>
		<description><![CDATA[GCC and G++, respectively, the GNU C compiler collection C and C++ language front ends, are a wondrous duo that usually do a decent job translating our C and C++ source into executable code. Well, most of the time at least&#8230;  
Wonderful as these tools are, however, they are not omnipotent and cannot guess [...]]]></description>
			<content:encoded><![CDATA[<p>GCC and G++, respectively, the GNU C compiler collection C and C++ language front ends, are a wondrous duo that usually do a decent job translating our C and C++ source into executable code. Well, most of the time at least&#8230; <img src='http://tuxology.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Wonderful as these tools are, however, they are not omnipotent and cannot guess what&#8217;s on our minds. Would this function we just wrote get called very often or no? is that if statement where we are going to take the if branch more often then the else one, or is it the other way around? the compiler simply can&#8217;t tell, without our help that is.</p>
<p>Supplying the compiler some hints when writing code, can be very beneficial in enabling the compiler to properly optimise the code it produced for best performance, how ever that is defined.</p>
<p>In this post we shall describe several hints that we can provide to GCC and G++ compiler to help them understand our program run time behaviour better and ultimately produce better code.</p>
<p>There are two types of constructs to provide hints to GCC and G++ about the run time attributes of the code you write for the purpose of optimisation: function attributes and built-ins.</p>
<p><strong>Function Attributes</strong></p>
<p>Function attributes are modifiers you add to function  definition that supply the compiler with additional information about that function run time behaviour. The canonical form of an attribute in GCC and G++ is:</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;">__attribute__<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>name<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>Where &#8220;name&#8221; is one of the reserved attributes names. Many such attributes exists and you are encouraged to read the <a title="Declaring Attributes of Functions" href="http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function-Attributes">GCC documentation</a> about them.</p>
<p>For example, this is how a function defined with the &#8220;pure&#8221; attribute will look like (more on the pure attribute itself later):</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;"><span style="color: #993333;">int</span> my_func<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> i<span style="color: #009900;">&#41;</span>  __attribute__<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>pure<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>;</pre></div></div>

<p>One very common shorthand form  that is often used in large project (for example, the Linux kernel), is to use a pre-processor define to make the attribute use less verbose, like so:</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;"><span style="color: #339933;">#define __pure __attribute__((pure))</span>
&nbsp;
<span style="color: #993333;">int</span>  my_func<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> i<span style="color: #009900;">&#41;</span> __pure;</pre></div></div>

<p>Or, as I prefer:</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;"><span style="color: #993333;">int</span>   __pure my_func<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> i<span style="color: #009900;">&#41;</span>;</pre></div></div>

<p>I shall use this shorthand form hence forth.</p>
<p>Now that we have established what are function attributes and how to use them, let us go over a list of such attributes which can be used to provide hints to the compiler and allow it to better optimise our code:</p>
<p><strong>The pure function attribute</strong></p>
<p>Many functions that we write are pure functions. A pure function is a function whose only effect is it&#8217;s return value and the return value, in turn, depends solely on the parameters to the function and/or gloval variables, such as that if we call the function with the same parameters and the same values in global variables we are guaranteed to get the same return value.</p>
<p>As an example, the functions <a title="strlen" href="http://linux.die.net/man/3/strlen">strlen(3)</a> and <a title="memcmp" href="http://linux.die.net/man/3/memcmp">memcmp(3)</a> are good examples for pure functions; their return value is solely dependant on their input parameters. On the other hand, the <a title="feof" href="http://linux.die.net/man/3/feof">feof(3)</a> function is a not a pure function, because, in a multi-threaded application, some other thread might have changed the state of the file the file descriptor is referencing between two calls of the function.</p>
<p>Compilers can make use of the knowledge that a certain function is a pure function by performing such optimisations such as common sub-expression elimination in the same way that this is done with arithmetic operators such as &#8220;+&#8221; or &#8220;*&#8221;.</p>
<p>Using the pure attribute, we can tell GCC and G++ that a certain function is a pure function and therefore might be a good candidate to optimisation. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;">size_t __pure strlen<span style="color: #009900;">&#40;</span><span style="color: #993333;">const</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span><span style="color: #009900;">&#41;</span> ;</pre></div></div>

<p>Note that the pure attribute  is not implemented in GCC versions earlier than 2.96.</p>
<p><strong>The hot and cold function attributes</strong></p>
<p>An additional pair of function attributes which you can use to help GCC and G++ emit better code are the hot and code function attributes:</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;">__attribute__<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>hot<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
__attribute__<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>cold<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>As their name suggests, these function attributes are used to hint the compiler that the corresponding functions are called often in your code (hot) or seldom called (cold).</p>
<p>The compiler can then order the code in branches, such as if statements, to favour branches that call these hot functions and disfavour functions cold functions, under the assumption that it is more likely that that the branch that will be taken will call a hot function and less likely to call a cold one.</p>
<p>In addition, the compiler can choose to group together functions marked as hot in a special section in the generated binary, on the premise that since data and instruction caches work based on locality, or the relative distance of related code and data, putting all the often called function together will result in better caching of their code for the entire application.</p>
<p>Good candidates for the hot attribute are core functions which are called very often in your code base. Good candidates for the cold attribute are internal  error handling functions which are called only in case of errors.</p>
<p>Here is a usage example:</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;"><span style="color: #993333;">int</span> __hot call_me_often<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>;
<span style="color: #993333;">int</span> __cold handle_error<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>;</pre></div></div>

<p>The hot and cold attributes are available GCC version from 4.3 and onwards.</p>
<p><strong>Built-ins</strong></p>
<p>Another form of hints that can be a programmer may provide to the compiler about the code run time behaviour for the purpose of optimisation, are calling a built-in compiler function.</p>
<p><strong>Data pre-fetching and cache pre-population<br />
</strong></p>
<p>As you are most probably aware, fetching information from RAM is a costly business in the terms of a computer program. This is why an elaborate system of internals on CPU and off CPU caches are used to store recently accessed data and instructions in the hope that these will be needed again soon and thus the cost of fetching them from RAM can be saved.</p>
<p>Most chip architectures and compilers do a pretty decent job working together to automatically populated the various caches with the right data and instructions in order to achieve better performance. Sometime however, a programmer can provide a hint to the compiler about what data might be needed in advance of time, thus allowing the compiler to emit instruction that will fetch the data from RAM to the cache while the CPU is busy doing other processing, thus making sure the data is available in the cache when the CPU gets around to needing it.</p>
<p>The way to do this with GCC and G++ is to use the built-in pre-fetch function:</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;"><span style="color: #993333;">void</span> __builtin_prefetch<span style="color: #009900;">&#40;</span> <span style="color: #993333;">const</span> <span style="color: #993333;">void</span> <span style="color: #339933;">*</span>addr<span style="color: #339933;">,</span> <span style="color: #993333;">int</span> rw<span style="color: #339933;">,</span> \
  <span style="color: #993333;">int</span> locality <span style="color: #009900;">&#41;</span>;</pre></div></div>

<p>The built-in pre-fetch function will cause the compiler to emit instructions that will pre-populate the cache with the data at address addr. Note that it is allowed to provide an illegal address to pre-fetch.</p>
<p>The optional rw parameter indicated whether the requested access is for read purposes or write (1 denotes read/write access while 0 denotes read only), whereas the optional locality parameter  describes the temporal locality of the data. That is, the degree to which it is likely the same data will be used again soon and therefore whether or not to keep the data in the cache after it is used (0 means &#8220;do not keep at all&#8221; and 3 denotes &#8220;keep as long as possible&#8221;).</p>
<p>As an usage example, consider the common operation of traversing a linked list. Typically, we iterate over the list, processing each item in turn and then progressing to the next list item:</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;"><span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>item<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  item<span style="color: #339933;">-&gt;</span>field++;
  <span style="color: #666666; font-style: italic;">// more processing...</span>
  item<span style="color: #339933;">++</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Using the built-in pre-fetch function, we can write the same code like this:</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;"><span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>item<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// Not NULL check since invalid addr OK</span>
  __builtin_prefetch<span style="color: #009900;">&#40;</span>item<span style="color: #339933;">-&gt;</span>next<span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span> ;
  item<span style="color: #339933;">-&gt;</span>field++;
  <span style="color: #666666; font-style: italic;">// more processing...</span>
  item<span style="color: #339933;">++</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Adding the pre-fetch call will allow the compiler to issue instructions that will get the CPU to start the transaction that will get the data for the next item fetched from the main RAM to the cache while processing the current field which is in the cache. With any luck, by the time the CPU finished processing the current item, the next item will have already been pre-fetched and populated the cache, just in time for it being processed.</p>
<p>Proper use of pre-fetching and cache pre-populating can sometime have a dramatic effect on the performance of some kinds of computer programs.</p>
<p><strong>Branch annotation</strong></p>
<p>Branches in program code path, such as those that happen due to an if statement, are challenging for modern CPUs. As most modern day CPUs makes use of multiple pipelines of instructions that execute in parallel, a branch in a program is problematic since the CPU does not know for sure in advance which branch will be taken until it has executed the entire instructions that lead up to the branch, thus stalling the pipeline.</p>
<p>The solution taken by CPU makers for this problem is the introduction of branch prediction logic into the CPU which tries to estimate which branch will be taken and try to advance with the pipeline based on that estimation. If the assumption is later proved to be wring, the CPU aborts the pipeline and starts over; a costly business.</p>
<p>As you probably have guessed by now though, we can use the knowledge we have as programmers about the program flow and hint the compiler about the chances that a certain branch, or if statement, will be taken or not. The compiler in turn, will use this information to bias the CPU to prefer to proceed with the most probable branch, the one least likely to cause a hazard and an abort of the pipeline.</p>
<p>Other benefits are that the compiler can re-order the binary code such that the code most likely to execute in a branch will be closest to the branch instruction itself, thus preserving code locality and therefore assisting caching.</p>
<p>Providing the GCC and G++ compilers with the probable outcome of a branch, we use the built-in expect function:</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;">__builtin_expect<span style="color: #009900;">&#40;</span><span style="color: #339933;">!!</span><span style="color: #009900;">&#40;</span>x<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> e<span style="color: #009900;">&#41;</span></pre></div></div>

<p>The function is used by applying it to a branch predicate, such as in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>__builtin_expect<span style="color: #009900;">&#40;</span><span style="color: #339933;">!!</span><span style="color: #009900;">&#40;</span>condition<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> ... <span style="color: #009900;">&#125;</span></pre></div></div>

<p>The x parameter to the built-in expect function is the predicate we test in the if statement and the e parameter is the most likely outcome of evaluating the predicate as a Boolean value: true or false.</p>
<p>Often, the built-in expect function is wrapped for convenience using two macros. Such is the case in the Linux kernel source, for example -</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;"><span style="color: #339933;">#define likely(x)	__builtin_expect(!!(x), 1)</span>
<span style="color: #339933;">#define unlikely(x)	__builtin_expect(!!(x), 0)</span></pre></div></div>

<p>Using these macros, the usage becomes the following, which is much more readable:</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>likely<span style="color: #009900;">&#40;</span>condition<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>...<span style="color: #009900;">&#125;</span></pre></div></div>

<p>It should be noted that GCC also provide a run time parameter -fprofile-arcs, which can profile the code for the actual statistics for each branch and the use of it should be prefered above guessing.</p>
<p><strong>Conclusion</strong></p>
<p>We have detailed above several note worthy way to providing hints to GCC and G++ compilers about your code behaviour in run time, hints that allow the compiler to better optimise your code and therefore achieve superior performance. Making a habit of using these hints as part of your normal code writing routine can easily provide substantial returns on a long enough scale.</p>
<p>Care should be taken however, to not get these hints wrong, as there is nothing worse then providing your compiler with the wring hint and thus &#8220;pessimising&#8221; your code instead of optimising it.</p>
]]></content:encoded>
			<wfw:commentRss>http://tuxology.net/2009/05/10/helping-the-compiler-help-you/feed/</wfw:commentRss>
		</item>
		<item>
		<title>glibc 2.10 news</title>
		<link>http://tuxology.net/2009/04/23/glibc-2-10-news/</link>
		<comments>http://tuxology.net/2009/04/23/glibc-2-10-news/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 08:56:05 +0000</pubDate>
		<dc:creator>Tuxology team</dc:creator>
		
		<category><![CDATA[Applications]]></category>

		<category><![CDATA[News]]></category>

		<category><![CDATA[changelog]]></category>

		<category><![CDATA[glibc]]></category>

		<category><![CDATA[urlich drapper]]></category>

		<guid isPermaLink="false">http://tuxology.net/?p=240</guid>
		<description><![CDATA[Ulrich Drepper, maintainer of glibc, published an interesting blog entry detailing some of the changes going into the glibc 2.10 release. Well worth a read.
]]></description>
			<content:encoded><![CDATA[<p>Ulrich Drepper, maintainer of glibc, published an interesting <a title="glibc 2.10 changes" href="http://udrepper.livejournal.com/20948.html">blog entry </a>detailing some of the changes going into the glibc 2.10 release. Well worth a read.</p>
]]></content:encoded>
			<wfw:commentRss>http://tuxology.net/2009/04/23/glibc-2-10-news/feed/</wfw:commentRss>
		</item>
		<item>
		<title>IBM DeveloperWorks: high availability for composite applications</title>
		<link>http://tuxology.net/2009/01/15/ibm-developerworks-high-availability-for-composite-applications/</link>
		<comments>http://tuxology.net/2009/01/15/ibm-developerworks-high-availability-for-composite-applications/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 15:40:46 +0000</pubDate>
		<dc:creator>Tuxology team</dc:creator>
		
		<category><![CDATA[Applications]]></category>

		<category><![CDATA[developerworks]]></category>

		<category><![CDATA[HA]]></category>

		<category><![CDATA[ibm]]></category>

		<category><![CDATA[linux-HA]]></category>

		<guid isPermaLink="false">http://tuxology.net/?p=221</guid>
		<description><![CDATA[IBM DeveloperWorks published a great article by Mahesh Viswanathan (maheshv@us.ibm.com), Senior Technical Staff Member at IBM and
Suraj Subramanian (suraj@us.ibm.com), Senior Integration Architect at 				IBM about an implementation of high availability              for a composite          [...]]]></description>
			<content:encoded><![CDATA[<p>IBM DeveloperWorks published a<a title="Enable high availability for composite applications" href="http://www.ibm.com/developerworks/linux/library/l-haccmdb/index.html"> great article</a> by <a href="http://www.ibm.com/developerworks/linux/library/l-haccmdb/index.html#author">Mahesh Viswanathan</a> (<a href="mailto:maheshv@us.ibm.com?subject=Enable%20high%20availability%20for%20composite%20applications">maheshv@us.ibm.com</a>), Senior Technical Staff Member at IBM and<br />
<a href="http://www.ibm.com/developerworks/linux/library/l-haccmdb/index.html#author">Suraj Subramanian</a> (<a href="mailto:suraj@us.ibm.com?subject=Enable%20high%20availability%20for%20composite%20applications">suraj@us.ibm.com</a>), Senior Integration Architect at 				IBM about an implementation of high availability              for a composite                 application using Linux-HA.</p>
]]></content:encoded>
			<wfw:commentRss>http://tuxology.net/2009/01/15/ibm-developerworks-high-availability-for-composite-applications/feed/</wfw:commentRss>
		</item>
		<item>
		<title>sys_clone: Beyond Processes and Threads</title>
		<link>http://tuxology.net/2009/01/01/sys_clone-beyond-processes-and-threads/</link>
		<comments>http://tuxology.net/2009/01/01/sys_clone-beyond-processes-and-threads/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 16:06:54 +0000</pubDate>
		<dc:creator>Gilad Ben-Yossef</dc:creator>
		
		<category><![CDATA[Applications]]></category>

		<category><![CDATA[clone]]></category>

		<category><![CDATA[fork]]></category>

		<category><![CDATA[mmap]]></category>

		<category><![CDATA[process]]></category>

		<category><![CDATA[pthread_create]]></category>

		<category><![CDATA[thread]]></category>

		<category><![CDATA[vfork]]></category>

		<guid isPermaLink="false">http://tuxology.net/?p=217</guid>
		<description><![CDATA[Most Linux developers are aware of the two library calls for creating a new context of execution in Linux:
fork() and related call vfork(), which create a new process, complete with it&#8217;s own process id, private address space and a private copy  set file descriptors, file system attributes (such as working directory) and signal handlers, all [...]]]></description>
			<content:encoded><![CDATA[<p>Most Linux developers are aware of the two library calls for creating a new context of execution in Linux:</p>
<p>fork() and related call vfork(), which create a new process, complete with it&#8217;s own process id, private address space and a private copy  set file descriptors, file system attributes (such as working directory) and signal handlers, all distinctly separate from those of the parent that called the fork() function.</p>
<p>And pthread_create(), which creates a new thread inside the existing process, which shares the same process id, address space, file descriptors, file system attributes and signal handlers with the caller.</p>
<p>Looking at these two options it would seem that were are faced with a &#8220;share all or share nothing&#8221; attitude - either we go the new process route and get a private copy of everything  (actually Linux employs copy on write semantics to make more efficient use of memory), or we can go the new thread route share all resources and for the most, these options are sufficient for most needs.</p>
<p>Sometimes, however, a less black and white approach is called for - such as a case where we would like to create a new context of execution sharing the file descriptors and file system attributes of the creator, but not it&#8217;s address space (or maybe juts a portion of it) and process id, for example.</p>
<p>For these cases exactly Linux offers <a title="Clone library call" href="http://linux.die.net/man/2/clone">clone(2)</a>. Clone is a library function implemented inside the C library, Glibc, which layered on top of the underlying sys_clone system call.</p>
<p>Clone is similar to <a title="fork system call" href="http://linux.die.net/man/2/fork">fork(2)</a> and <a title="pthread_create system call" href="http://linux.die.net/man/3/pthread_create">pthread_create(3)</a> in that it creates a new execution context which are scheduled independently from the creator.</p>
<p>Unlike fork and pthread_create, however, clone provides a fine grained level of control of the properties of this new context:</p>
<ul>
<li>What it will and what it will not share with its creator.</li>
<li>Which parent process will it belong to.</li>
<li>Which signal, if any, will be delivered to its parent when it terminates.</li>
<li>Where is the location of the new task call stack.</li>
</ul>
<p>As an example, here a code snippet that creates a new task (for lack of a better word), which implements our previous example - a new process which has its own process ID, a private address space (with a copy on write semantic of the creator address space) and a separate set of signal handlers, but shares with its creating process the table of file descriptors, file system attributes:</p>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;"><span style="color: #339933;">#include &lt;ched.h&gt;</span>
&nbsp;
<span style="color: #339933;">#define STACK_SIZE 4096</span>
&nbsp;
<span style="color: #993333;">void</span> <span style="color: #339933;">*</span> stack <span style="color: #339933;">=</span> mmap<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">NULL</span><span style="color: #339933;">,</span> STACK_SIZE <span style="color: #339933;">,</span> \
   PROT_READ | PROT_WRITE<span style="color: #339933;">,</span> MAP_PRIVATE | \
   MAP_ANON | MAP_GROWSDOWN<span style="color: #339933;">,</span> <span style="color: #339933;">-</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color:#800080;">0</span><span style="color: #009900;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">/* check for alloc errors... */</span>
&nbsp;
clone<span style="color: #009900;">&#40;</span>test<span style="color: #339933;">,</span> stack<span style="color: #339933;">,</span> CLONE_FS | CLONE_FILES \
    | SIGCHLD| CLONE_PARENT<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">NULL</span><span style="color: #009900;">&#41;</span>;
<span style="color: #808080; font-style: italic;">/* check for clone errors... */</span>
&nbsp;
munmap<span style="color: #009900;">&#40;</span>stack<span style="color: #339933;">,</span> STACK_SIZE<span style="color: #009900;">&#41;</span>;</pre></div></div>

<p>As you can see in the example above, we first allocate a stack for the new task using an anonymous private memory mapping and instruct the kernel to grow the mapping downwards as need be (this is actually not true on all architectures).</p>
<p>Them, we use the clone library call to create the new task, sharing the file descriptor table and file system attributes, but not the address space with the creator.</p>
<p>We also ask that the new task will inherit the same parent as the creator and that a SIGCHLD signal will be sent to the parent of the new task, as normally would be the case.</p>
<p>As you can see, the clone library call and the sys_clone are a powerful tool that can be used to create unique execution contexts beyond the standard thread or process variety. Many more options are detailed in the <a title="clone" href="http://linux.die.net/man/2/clone">clone(2) man page</a>.</p>
<p>Gilad</p>
]]></content:encoded>
			<wfw:commentRss>http://tuxology.net/2009/01/01/sys_clone-beyond-processes-and-threads/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Herzelinux lecture slides : Initramfs - boot your Linux WELL</title>
		<link>http://tuxology.net/2008/12/29/herzelinux-lecture-slides-initramfs-boot-your-linux-well/</link>
		<comments>http://tuxology.net/2008/12/29/herzelinux-lecture-slides-initramfs-boot-your-linux-well/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 12:39:19 +0000</pubDate>
		<dc:creator>Tuxology team</dc:creator>
		
		<category><![CDATA[Herzelinux]]></category>

		<category><![CDATA[Lectures]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Embedded]]></category>

		<category><![CDATA[lecture]]></category>

		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://tuxology.net/?p=207</guid>
		<description><![CDATA[On 18/12/2008 Zaar Hai gave a lecture in Herzelinux named &#8220;Initramfs - boot your Linux WELL&#8221;
the slides for the lecture is now available here.
Thanks you Zaar and we look forward to hosting you again in Herzelinux club meeting as well as here.
Tuxology Team.
]]></description>
			<content:encoded><![CDATA[<p>On 18/12/2008 Zaar Hai gave a lecture in Herzelinux named &#8220;Initramfs - boot your Linux WELL&#8221;<br />
the slides for the lecture is now available <a href="http://tuxology.net/lectures/initramfs-boot-your-linux-well/">here</a>.</p>
<p>Thanks you Zaar and we look forward to hosting you again in Herzelinux club meeting as well as here.</p>
<p>Tuxology Team.</p>
]]></content:encoded>
			<wfw:commentRss>http://tuxology.net/2008/12/29/herzelinux-lecture-slides-initramfs-boot-your-linux-well/feed/</wfw:commentRss>
		</item>
		<item>
		<title>IBM DeveloperWorks: Anatomy of Linux process management</title>
		<link>http://tuxology.net/2008/12/25/ibm-developerworks-anatomy-of-linux-process-management/</link>
		<comments>http://tuxology.net/2008/12/25/ibm-developerworks-anatomy-of-linux-process-management/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 07:55:02 +0000</pubDate>
		<dc:creator>Tuxology team</dc:creator>
		
		<category><![CDATA[Kernel]]></category>

		<category><![CDATA[article]]></category>

		<category><![CDATA[ibm]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[process]]></category>

		<category><![CDATA[tim jones]]></category>

		<guid isPermaLink="false">http://tuxology.net/?p=195</guid>
		<description><![CDATA[IBM DeveloperWorks web site just published a good article by Tim Jones discussing the anatomy of processes in Linux.
To the article&#8230;
]]></description>
			<content:encoded><![CDATA[<p>IBM DeveloperWorks web site just published a good article by Tim Jones discussing the anatomy of processes in Linux.</p>
<p><a href="http://www.ibm.com/developerworks/linux/library/l-linux-process-management/">To the article&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tuxology.net/2008/12/25/ibm-developerworks-anatomy-of-linux-process-management/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building an embedded Linux system emulator</title>
		<link>http://tuxology.net/2008/12/14/embedded-emulator/</link>
		<comments>http://tuxology.net/2008/12/14/embedded-emulator/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 15:01:16 +0000</pubDate>
		<dc:creator>Gilad Ben-Yossef</dc:creator>
		
		<category><![CDATA[Embedded]]></category>

		<category><![CDATA[Hardware]]></category>

		<category><![CDATA[Kernel]]></category>

		<category><![CDATA[debugging]]></category>

		<category><![CDATA[arm]]></category>

		<category><![CDATA[buildroot]]></category>

		<category><![CDATA[busybox]]></category>

		<category><![CDATA[emulator]]></category>

		<category><![CDATA[ftp]]></category>

		<category><![CDATA[http]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[mips]]></category>

		<category><![CDATA[powerpc]]></category>

		<category><![CDATA[ppc]]></category>

		<category><![CDATA[qemu]]></category>

		<category><![CDATA[sparc]]></category>

		<category><![CDATA[tftp]]></category>

		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://tuxology.net/?p=137</guid>
		<description><![CDATA[One of the hallmarks of embedded system programming is working with specialized hardware. Unfortunately, embedded system developers do not always have the luxury to develop and test their code on the actual hardware they target. Often, the hardware is developed  in tandem with the system software and therefore it it is not available for [...]]]></description>
			<content:encoded><![CDATA[<p>One of the hallmarks of embedded system programming is working with specialized hardware. Unfortunately, embedded system developers do not always have the luxury to develop and test their code on the actual hardware they target. Often, the hardware is developed  in tandem with the system software and therefore it it is not available for much of the embedded system software development cycle.</p>
<p>While one can develop and test much of our code on a PC  running Linux, such a  PC is a very different environment from the target board. More often then not, the target board is not even of the same architecture as the PC. A solution to this problem can be obtained by using an emulator -  a software tool that executes software code of our target platform in a virtual machine that is running on our development host, and running our system software in it.</p>
<p>The following article describes how to build an embedded Linux system running inside an emulator which can be used to develop, test and debug target code even without access to target hardware.</p>
<p><span id="more-137"></span></p>
<p><strong>The components</strong></p>
<p>To build our emulator we will need the following components:</p>
<ul>
<li>Hardware emulator (we&#8217;ll use Qemu)</li>
<li>Minimal Linux root file system containing a C library and <a href="http://www.busybox.net">Busybox</a></li>
<li>The <a title="Linux" href="http://kernel.org">Linux</a> kernel</li>
</ul>
<p><strong>Installing Qemu</strong></p>
<p>As first step, we will download and install the <a href="http://qemu.org/">Qemu</a> emulator. Qemu is an Open Source machine emulator supporting seven target architectures, including x86, MIPS, Arm and PowerPC, creating by Fabrice Ballard.</p>
<p>Depending on the Linux distribution you use as a workstation, you might be able to use the native package management system of the distribution to get do that.</p>
<p>For Debian, Ubuntu and derivatives:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ sudo apt-get install qemu</pre></div></div>

<p>For Fedore and derivatives (as root):</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;"># yum install qemu</pre></div></div>

<p>For other distributions lacking a Qemu package or those wishing to obtain the very latest package. Note that the &#8220;i386&#8243; label refers to the host running the emulator and not the target platform:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ wget http://bellard.org/qemu/qemu-0.9.1-i386.tar.gz
$ cd /
$ sudo tar zxvf qemu-0.9.1-i386.tar.gz</pre></div></div>

<p>Or, as root:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;"># tar zxvf qemu-0.9.1-i386.tar.gz</pre></div></div>

<p>Alternatively, you can download the sources and build the emulator from scratch. This has the added advantage that you can later adapt the emulator to more accurately reflect your actual hardware:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ wget http://bellard.org/qemu/qemu-0.9.1.tar.gz
$ tar zxvf qemu-0.9.1.tar.gz
$ cd qemu-0.9.1/
$ ./configure
$ make
$ sudo make install</pre></div></div>

<p>Or, as root:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;"># make install</pre></div></div>

<p><strong>Kernel and file system images</strong></p>
<p>The Qemu emulator we have just installed provides a virtual machine mimicking our target hardware. To actually get Linux running on this virtual machine however, we will need to download an image of the Linux kernel and a suitable root file system image for our target architecture.</p>
<p>Luckily, the Qemu project provides several test images for several architectures supported by Qemu that can be used to get a fast start with Qemu as an embedded Linux system emulator.</p>
<p>Go to the Qemu project <a title="Qemu download page" href="http://bellard.org/qemu/download.html">download page</a> and choose one of the Qemu test disk images suitable for your embedded platform and download it to your Linux host (in this example we use arm):</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ wget http://bellard.org/qemu/arm-test-0.2.tar.gz</pre></div></div>

<p>Now extract the image:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ tar zxvf arm-test-0.2.tar.gz
$ cd arm-test</pre></div></div>

<p><strong>Booting Linux on the emulator</strong></p>
<p>Start up Qemu with the following command line, adjusting the architecture name, kernel file name and root file system image name according to your specific architecture (again, we use arm in this example):</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ qemu-system-arm -kernel zImage.integrator \
   -initrd arm_root.img -tftp / -redir tcp:9999::9999</pre></div></div>

<p>The above command line starts Qemu in system emulation mode, booting into the kernel image zImage.integrator while loading into the virtual machine RAM the arm_root.img file system and instructing Qemu to make your entire host root file system available for access via TFTP from the emulated machine (more on this ahead).</p>
<p>You should now be seeing a window similar to the following in which the emulated LCD display of the board is shown:</p>
<div id="attachment_156" class="wp-caption aligncenter" style="width: 310px"><a href="http://tuxology.net/wp-content/uploads/2008/12/qemu_screenshot.png"><img class="size-medium wp-image-156" title="qemu_screenshot" src="http://tuxology.net/wp-content/uploads/2008/12/qemu_screenshot-300x233.png" alt="Qemu screenshot" width="300" height="233" /></a><p class="wp-caption-text">Qemu screenshot</p></div>
<p>You can log-in with the user &#8220;root&#8221;. No password is required.</p>
<p><strong>Transferring files to and from the host</strong></p>
<p>The emulator and file system are set up to automatically configure a virtual Ethernet interface in the virtual machine with an internal IP. Through that virtual network interface, the emulator is set up to enable transferring of files to and from the host machine file system using the TFTP protocol.</p>
<p>For example, the following command will copy the file &#8220;/home/gby/hello_emu&#8221; from the host file system to the  current directory inside the emulator:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ tftp -g -r /home/gby/hello_emu -l hello_emu 10.0.2.2</pre></div></div>

<p>The following command will copy the file &#8220;/root/test.log&#8221; from the emulator to the host file system directory &#8220;/home/gby/&#8221;:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ tftp -p -l/root/test.log -r /home/gby/test.log 10.0.2.2</pre></div></div>

<p>In addition, you can use the &#8220;wget&#8221; comment to transfer files using the FTP and HTTP protocol to the emulator from any compatible server accessible in the network:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ wget http://codefidence.com/some/file</pre></div></div>

<p>Qemu supports numerous other way to interact with the host and it&#8217;s environment, including bridged virtual network interfaces (as opposed to the default NAT used in the example above) which enables both using NFS to communicate with the host as well as remote debugging from the host, VLAN support, exposing the host file system as a FAT file system,  mounting disk, flash or CDROM images from the host file system and even using USB devices connected to the host. For more information on these advanced options, please refer to the <a title="Qemu user manual" href="http://bellard.org/qemu/qemu-doc.html">Qemu user manual</a>.</p>
<p><strong>Debugging user applications</strong></p>
<p>Using the GNU debugger GDBserver agent, we can debug applications running inside the emulator using the GDB debugger on the host. To do this, first copy (using one of the methods outlined above) the &#8220;gdbserver&#8221; executable to the emulator. Note that you will need a &#8220;gdbserver&#8221; executable which was built to run on the target architecture (such as Arm, in the example above) and not on the host!</p>
<p>Also note that since the test images do not contain debugging symbols for the system libraries, you will only be able to debug statically compiled application using them. This limitation can be removed by building your own kernel and file system image (see below for more information on this topic).</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ tftp -g -r /home/gby/src/gdb/gdb/gdbserver/gdberver \
   -l gdbserver 10.0.2.2</pre></div></div>

<p>Next, assign the gdbserver binary execute permissions:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ chmod u+x gdbserver</pre></div></div>

<p>Now, run the gdbserver agent, instructing it to use port 9999 (which have redirected to the emulator using the qemu command line) to listen for connections from the debugger:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ gdbserver 0.0.0.0:9999 /bin/myprog</pre></div></div>

<p>Or, if you wish to attach to an already running program, use:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ gdbserver 0.0.0.0:9999 --attach 1234</pre></div></div>

<p>Finally, run the GDB debugger on your host and instruct it to connect to the host local port 9999 (which the emulator is redirected to the virtual machine):</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ arm-linux-gdb target/bin/myprog
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
...
(gdb) set solib-absulote-prefix /dev/null
(gdb) set solib-search-path target/lib/
(gdb) target remote 127.0.0.1:9999</pre></div></div>

<p><strong>Debugging the kernel</strong></p>
<p>Using the Qemu emulator to debug kernel code is quite straight forward as Qemu incorporates a minimal GDB agent as part of the emulator itself. To debug the Linux kernel running inside the emulator, add the &#8220;-s&#8221; parameter to the command line used to start Qemu:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ qemu-system-arm -kernel zImage.integrator \
    -initrd arm_root.img -tftp / -redir tcp:9999::9999 -s</pre></div></div>

<p>Now when the emulator will start, it will wait for a debugger connection on the default port &#8220;1234&#8243; (or a different port specific with the &#8220;-p&#8221; option) , before proceeding with the boot. Once the emulator has started, you can debug the Linux kernel running inside using GDB on the host:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ arm-linux-gdb linux/vmlinux
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
...
(gdb) target remote 127.0.0.1:1234</pre></div></div>

<p>You can use GDB as you normally would. For example, type &#8220;cont&#8221; to launch the kernel:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">(gdb) cont</pre></div></div>

<p><strong>Building your own kernel and file system images</strong></p>
<p>So far we have seen how to use the Qemu emulator with the test kernel and file system images that are available on the Qemu site. To make full use of the emulator, we can create our own custom kernel and file system images that will better reflect the real target we are trying to develop for.</p>
<p>First, query  Qemu regarding which boards it can emulate for you chosen architecture. Replace &#8220;arm&#8221; in the example above with one of: mips, x86_64, ppc or sparc. For i386, simply use &#8220;qemu&#8221; as the command:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ qemu-system-arm -M \?</pre></div></div>

<p>Choose the board that most closely resembles your real target environment. Note that  you can add support to Qemu of your specific true board. This requires some programming though and we shall not cover it in this tutorial.</p>
<p>The creation of kernel and file system for our emulated target is no different then doing the same task for a real hardware and in fact. Many tools are freely  available to accomplish this task. In this example we shall use the Buildroot framework. Buildroot is a set of make files and patches that makes it easy generate a cross-compilation tool chain and root file system for your target Linux system using the uClibc C library:</p>
<p>First, we shall download the latest Buildroot release from the project web site and extract it:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ wget http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2
$ tar jxvf buildroot-snapshot.tar.bz2
$ cd buildroot/</pre></div></div>

<p>Next, let&#8217;s configure Buildroot for our chosen target board:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ make menuconfig</pre></div></div>

<p>You will be presented with a menu enabling you to pick your architecture, sub-architecture, specific board to build for, GCC and uClibc versions and related details. For each entry of the configuration tool, you can find associated help that describes the purpose of the entry.</p>
<p>At minimum, the following configuration options needs to be set:</p>
<ul>
<li>Target Architecture option - choose your target architecture (e.g. arm.)</li>
<li> Target Architecture Variant option - chose a specific model of the architecture (e.g. arm926t.)</li>
<li>Target options menu - if the target board you wish to emulate (that is supported by Qemu) is listed, turn on support for that board (e.g. enable the  &#8220;ARM Ltd. Device Support&#8221; menu  and inside it choose the &#8220;Integrator arm926&#8243; option).</li>
<li>Toolchain  menu - turn on &#8220;Build gdb server for the Target&#8221; option and if you would like to test C++ programs on the emulator, also the &#8220;C++ cross-compiler support&#8221; option.</li>
<li>Target filesystem options menu - enable the &#8220;cpio the root filesystem&#8221; option and choose the &#8220;gzip&#8221; compression method. You may also request the file system image to be copied to a specified directory once it is generated here.</li>
<li>
<p>Kernel menu - choose  the &#8220;linux (Advanced configuration)&#8221; option and pick one of the offered Linux kernel versions of the list offered. Also, select the &#8220;zImage&#8221; binary format. Here you can also specify a directory to copy the generated kernel to. </p>
<p>In addition, you will need to supply a proper Linux kernel configuration file. Note that you extract the kernel configuration configuration file used to generate the kernel supplied as part of the test images by issuing the following command when inside the emulator:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ zcat /proc/config.gz &gt; linux.config</pre></div></div>

</p>
<p>Alternatively, Linux provides specific kernel configuration for optimal use with Qemu for some architectures. Run the following command to inspect the default kernel configuration included in a specific Linux kernel version:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ make help</pre></div></div>

</p>
</li>
</ul>
<p>When you&#8217;ve done configuring Buildroot, exit the configuration utility (making sure to OK saving the changes) and type: &#8220;make&#8221;. Buildroot will now download all required sources and build your new kernel and file system image for you. You should now be able to run the emulator using the kernel and file system image you have just created. Use the file name and path of the zImage binary as a parameter to Qemu &#8220;-kernel&#8221; option and the file name and path of the file system image to the Qemu &#8220;-initrd&#8221; parameter, like so:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ qemu-system-arm -kernel zImage \
    -initrd rootfs.arm.cpio.gz -tftp / -redir tcp:9999::9999 -s</pre></div></div>

<p><strong>Conclusion</strong></p>
<p>As we have shown, the Qemu emulator provides a fairly simple way to develop, debug, and test Linux kernels, drivers, and applications for a variety of embedded architectures, even when no actual hardware is available. More information about the software used in this article can be found on the <a href="http://www.qemu.org/">qemu</a>, <a href="http://www.gnu.org/software/gdb/">gdb</a>, and <a href="http://buildroot.uclibc.org/">Buildroot</a> websites.</p>
<hr />
<italic>Fixes and conclusion by Henry Kingman from <a href="http://linuxdevices.com">LinuxDevices.com</a>. Thanks Henry! <img src='http://tuxology.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </italic></p>
]]></content:encoded>
			<wfw:commentRss>http://tuxology.net/2008/12/14/embedded-emulator/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rami Rosen on IPv6 in Linux</title>
		<link>http://tuxology.net/2008/11/10/rami-rosen-on-ipv6-in-linux/</link>
		<comments>http://tuxology.net/2008/11/10/rami-rosen-on-ipv6-in-linux/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 14:22:49 +0000</pubDate>
		<dc:creator>Tuxology team</dc:creator>
		
		<category><![CDATA[Herzelinux]]></category>

		<category><![CDATA[Lectures]]></category>

		<category><![CDATA[Network]]></category>

		<category><![CDATA[article]]></category>

		<category><![CDATA[ipv6]]></category>

		<category><![CDATA[lecture]]></category>

		<category><![CDATA[linuxdevices]]></category>

		<category><![CDATA[networking]]></category>

		<category><![CDATA[rami rosen]]></category>

		<category><![CDATA[slides]]></category>

		<guid isPermaLink="false">http://tuxology.net/?p=116</guid>
		<description><![CDATA[Last Thursday Rami Rosen, a Computer Science graduate of The Technion Israel Institute of Technology in Haifa, Israel and a Linux kernel programmer for a networking startup, gave an excellent talk about IPv6 and it&#8217;s implementation in the Linux kernel at monthly the Herzlinux meeting.
For those of our reader which were absent, fear not! not [...]]]></description>
			<content:encoded><![CDATA[<p>Last Thursday Rami Rosen, a Computer Science graduate of The Technion Israel Institute of Technology in Haifa, Israel and a Linux kernel programmer for a networking startup, gave an excellent talk about IPv6 and it&#8217;s implementation in the Linux kernel at monthly the <a href="http://tuxology.net/herzelinux">Herzlinux</a> meeting.</p>
<p>For those of our reader which were absent, fear not! not only are the slides for the lecture available <a href="http://tuxology.net/lectures/ipv6-in-the-linux-kernel/">here,</a> Rami posted an excellent <a href="http://linuxdevices.com/articles/AT7843301253.html">article based on the lecture</a> on <a href="http://linuxdevices.com/">LinuxDevices.com</a>.</p>
<p>Thanks you Rami and we look forward to hosting you again in <a href="http://tuxology.net/herzelinux/">Herzelinux</a> club meeting as well as here.</p>
<p>Tuxology Team.</p>
]]></content:encoded>
			<wfw:commentRss>http://tuxology.net/2008/11/10/rami-rosen-on-ipv6-in-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Videos from the Linux Symposium in Ottawa</title>
		<link>http://tuxology.net/2008/08/14/videos-from-the-linux-symposium-in-ottawa/</link>
		<comments>http://tuxology.net/2008/08/14/videos-from-the-linux-symposium-in-ottawa/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 14:31:04 +0000</pubDate>
		<dc:creator>Gilad Ben-Yossef</dc:creator>
		
		<category><![CDATA[Conferences]]></category>

		<category><![CDATA[Lectures]]></category>

		<category><![CDATA[Video]]></category>

		<category><![CDATA[Embedded]]></category>

		<category><![CDATA[free electrons]]></category>

		<category><![CDATA[ols]]></category>

		<category><![CDATA[openmoko]]></category>

		<category><![CDATA[real time]]></category>

		<category><![CDATA[talks]]></category>

		<guid isPermaLink="false">http://tuxology.net/?p=86</guid>
		<description><![CDATA[The wonderful Michael Opdenacker and Thomas Petazzoni from Free Electrons are at it again - they have released 29 videos of talks, tutorials and &#8220;birds of a feather&#8221; sessions given at the 2008 Linux Symposium in Ottawa.
The released video includes the following:

Keynote: The Kernel: 10 Years in Review, by Matthew Wilcox (Intel)
Talk: Tux on the [...]]]></description>
			<content:encoded><![CDATA[<p>The wonderful Michael Opdenacker and Thomas Petazzoni from <a href="http://free-electrons.com/">Free Electrons</a> are at it again - they have released 29 videos of talks, tutorials and &#8220;birds of a feather&#8221; sessions given at the 2008 Linux Symposium in Ottawa.</p>
<p>The released video includes the following:</p>
<ul>
<li>Keynote: The Kernel: 10 Years in Review, by Matthew Wilcox (Intel)</li>
<li>Talk: Tux on the Air: State of Linux Wireless Networking, by John W. Linville (Red Hat)</li>
<li>Talk: Suspend to RAM in Linux: State of the Union, by Len Brown and Rafael Wysocki (Intel)</li>
<li>Talk: Real Time vs Real Fast: How To Choose?, by Paul E. McKenney (IBM)</li>
<li>Tutorial: ftrace: latency tracer, by Steven Rostedt (Red Hat)</li>
<li>BOF: Embedded Linux, by Tim R. Bird (Sony)</li>
<li>BOF: Embedded Micro controller Linux, by Michael Durrant (Arcturus Networks)</li>
<li>Talk: Energy-aware task and interrupt management, by Vaidyanathan Srinivasan (IBM)</li>
<li>Talk: Application Testing Under Realtime Linux, by Luis Claudio R. Gonçalves (Red Hat)</li>
<li>Talk: Application Framework for Your Mobile Device, by Shreyas Srinivasan (Geodesic Information Systems)</li>
<li>Keynote: The Making of OpenMoko Neo, by Werner Almesberger (OpenMoko)</li>
<li>BOF: U-Boot by Wolfgang Denk (Denx)</li>
<li>BOF: Linux Compiler, by Rob Landley (Impact Linux)</li>
<li>Talk: Advanced XIP File System, by Jared Hulbert (Intel)</li>
<li>Talk: SELinux for Consumer Electronic Devices, by Yuichi Nakamura (Hitachi)</li>
<li>Talk: Around the Linux File System World in 45 Minutes, by Steve French (IBM)</li>
<li>BOF: Linux The Easy Way with LTIB, by Stuart Hughes (Freescale)</li>
<li>Keynote: The Joy of Synchronicity: Coordinating the Releases of Upstream and Distributions, by Mark Shuttleworth</li>
<li>Talk: Smack in Embedded Computing, by Casey Schauffer</li>
<li>Talk: Bazillions of Pages: The Future of Memory Management, by Christoph H. Lameter (SGI)</li>
<li>Tutorial: Writing application fault handlers, by Gilad Ben-Yossef (Codefidence)</li>
<li>Talk: Linux, Open Source and System Bringup Tools, by Tim Hockin (Google)</li>
<li>Talk: DCCP Reached Mobiles, by Leandro Melo Sales (Federal University of Campina Grande)</li>
<li>Talk: Building a robust Linux kernel, by Subrata Modak (IBM)</li>
<li>CELF BOF presentation: Best of recent CELF Conferences, by Tim Bird (Sony)</li>
<li>CELF BOF presentation: Developing Embedded Linux with Target Control, by Tim Bird (Sony)</li>
<li>CELF BOF presentation: Embedded Building Tools - An Audience Survey, by Michael Opdenacker (Free Electrons)</li>
<li>CELF BOF presentation: GCC Tips and Tricks Highlights, by Gene Sally</li>
</ul>
<p>The videos and related resources can be downloaded from their <a href="http://free-electrons.com/community/videos/conferences/">conference videos page</a>.</p>
<p>I especially recommend viewing the exceptional &#8220;Real Time vs Real Fast: How To Choose?&#8221; talk by Paul E. McKenney from IBM and the the &#8220;The Making of OpenMoko Neo&#8221; keynote, by Werner Almesberger of the OpenMoko.</p>
<p>Much thanks to Michael and Thomas for sharing this with everybody.</p>
<p>Gilad</p>
]]></content:encoded>
			<wfw:commentRss>http://tuxology.net/2008/08/14/videos-from-the-linux-symposium-in-ottawa/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
