<?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>Hazel McKendrick &#187; threads</title>
	<atom:link href="http://hazelmckendrick.com/journal/tag/threads/feed" rel="self" type="application/rss+xml" />
	<link>http://hazelmckendrick.com</link>
	<description>Programming and Games Technology Portfolio</description>
	<lastBuildDate>Mon, 20 Jun 2011 17:44:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Project Experiments</title>
		<link>http://hazelmckendrick.com/journal/project-experiments</link>
		<comments>http://hazelmckendrick.com/journal/project-experiments#comments</comments>
		<pubDate>Tue, 27 Oct 2009 21:57:06 +0000</pubDate>
		<dc:creator>Hazel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[University Project]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[dissertation]]></category>
		<category><![CDATA[threads]]></category>

		<guid isPermaLink="false">http://hazelmckendrick.com/?p=1623</guid>
		<description><![CDATA[I&#8217;ve made some progress in the past week with my honours projects, creating small experimental programs to familiarise myself with multi-threading in .NET. Thankfully so far I&#8217;ve found the syntax clear and consistent with the terms normally involved in parallel processing. Although this doesn&#8217;t simplify the task of designing the program it certainly avoids the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://hazelmckendrick.com/wp-content/uploads/2009/10/Untitled2.png"><img src="http://hazelmckendrick.com/wp-content/uploads/2009/10/Untitled2-300x233.png" alt="Untitled2" title="Untitled2" width="300" height="233" class="alignright size-medium wp-image-1626" /></a>I&#8217;ve made some progress in the past week with my honours projects, creating small experimental programs to familiarise myself with multi-threading in .NET.  Thankfully so far I&#8217;ve found the syntax clear and consistent with the terms normally involved in parallel processing.  Although this doesn&#8217;t simplify the task of designing the program it certainly avoids the implementation overhead which has been inherent in my attempts with multi-threading in C++.</p>
<p>The programs I&#8217;ve been working on are in C#, though I&#8217;d be interested to try other .NET languages.  In each, I processed thousands of entities allowing each to rotate and bounce around a window.  Different methods of splitting up and dealing with this work in parallel were experimented with.  <span id="more-1623"></span></p>
<p>Rendering, which was performed separately and was responsible for a fair amount of overhead, could be simplified or rearranged to increase overall frame processing time.  However, as the graph below (from my first program created) shows there was a noticeable difference between using one and multiple threads.  I&#8217;m using a dual core CPU on my laptop, and with the application limited to a single core the gain was far less significant; I hope to see whether using a quad core CPU would offer a further gain in the near future.</p>
<p>Although not shown, using 32, 64 or even 1024 threads caused far less of a performance hit that I had expected.  The time spent creating the threads at the beginning of the program was notable, however, as was the increase in memory requirements.</p>
<p><a href="http://hazelmckendrick.com/wp-content/uploads/2009/10/graph.png"><img src="http://hazelmckendrick.com/wp-content/uploads/2009/10/graph.png" alt="graph" title="graph" width="645" height="427" class="aligncenter size-full wp-image-1627" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://hazelmckendrick.com/journal/project-experiments/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

