<?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>davidcoombes.co</title>
	<atom:link href="http://www.davidcoombes.co/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.davidcoombes.co</link>
	<description>A collection of Utilities, Technical Articles and Source Code focused mainly on the internals of the Windows Operating System</description>
	<lastBuildDate>Fri, 14 Oct 2011 19:20:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Page Request Blocking in Asynchronous ASP.NET MVC requests</title>
		<link>http://www.davidcoombes.co/?p=151&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=page-request-blocking-in-asynchronous-asp-net-mvc-requests</link>
		<comments>http://www.davidcoombes.co/?p=151#comments</comments>
		<pubDate>Fri, 07 Oct 2011 11:33:39 +0000</pubDate>
		<dc:creator>David Coombes</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[sessionstate]]></category>

		<guid isPermaLink="false">http://www.davidcoombes.co/?p=151</guid>
		<description><![CDATA[More and more websites are making use of the latest web technologies such as partial page post backs with ASP.NET and jQuery AJAX post with ASP.NET MVC There is common problem with these types of requests and that is serialisation.  IIS will serialise all requests to the same ASP.NET session for pages that have read [...]]]></description>
			<content:encoded><![CDATA[<p>More and more websites are making use of the latest web technologies such as partial page post backs with ASP.NET and jQuery AJAX post with ASP.NET MVC</p>
<p>There is common problem with these types of requests and that is serialisation.  IIS will serialise all requests to the same ASP.NET session for pages that have read /write access to the Session state.</p>
<p>The example blow shows an ASP.NET MVC 3 application which performs 5 Ajax requests simultaneously. 1 to the SlowPost() action and 4 to the FastPost() action.</p>
<p>SlowPost() – performs a thread sleep for 8 seconds and returns<br />
FastPost()  &#8211; returns instantly</p>
<p>As you can see from the screen shot taken from HttpWatch all requests take about 8 seconds to complete this is because the 4 FastPost() requests were queued behind the initial SlowPost() request that was made.</p>
<p><a href="http://www.davidcoombes.co/wp-content/uploads/2011/10/sync_example.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2Fsync_example.png','sync_example')"><img class="alignnone size-full wp-image-169" title="sync_example" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/sync_example.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2Fsync_example.png','sync_example')" alt="" width="980" height="121" /></a></p>
<p>There are several options available to us to work around this serialisation behaviour. The first is to disable or make read-only the session state for a particular page or controller. This allows all requests that don’t require write access to the session state to run asynchronously.</p>
<p>To make an MVC controller’s access to the session state read-only add the following to the top of the controller class.</p>
<p>[SessionState(SessionStateBehavior.ReadOnly)] – See <a title="SessionStateBehaviour" href="http://msdn.microsoft.com/en-us/library/system.web.sessionstate.sessionstatebehavior.aspx" onclick="return TrackClick('http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fsystem.web.sessionstate.sessionstatebehavior.aspx','SessionStateBehaviour')" target="_blank">SessionStateBehaviour</a> for more information.</p>
<p><a href="http://www.davidcoombes.co/wp-content/uploads/2011/10/sessionstate_options.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2Fsessionstate_options.png','sessionstate_options')"><img class="alignnone size-full wp-image-166" title="sessionstate_options" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/sessionstate_options.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2Fsessionstate_options.png','sessionstate_options')" alt="" width="385" height="137" /></a></p>
<p>As you can see from the HttpWatch screen shot below by adding the ReadOnly option to the controller all the FastPost() actions completed instantly and do not block waiting for the SlowPost() action to complete.</p>
<p><a href="http://www.davidcoombes.co/wp-content/uploads/2011/10/async_example.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2Fasync_example.png','async_example')"><img class="alignnone size-full wp-image-170" title="async_example" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/async_example.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2Fasync_example.png','async_example')" alt="" width="989" height="144" /></a></p>
<p>But what if your actions require read/write access to the session state?</p>
<p>The SessionStateBehaviour.ReadOnly option does not prevent you writing to the session state, it just causes the ASP.NET engine to apply a read-only lock to the request. If multiple requests write to the session state when in read-only mode corruption can occur as updates can happen at the same time from different requests.</p>
<p>To work around this I have developed an asynchronous session state class which gives the developer the choice of when to lock and unlock access to the session state per request.</p>
<p>Often for requests that take some time to execute, access to the session state is not required all the time.</p>
<p>For example a request may read a variable from the session state, perform a database query and then write something back to the session state. The only time we need to block access to the session state is during the initial read and then the write at the end, not during the database query.</p>
<p>ASyncSession.cs provides access to the Application state and Session state objects but also has a Lock() and Unlock() method to control access from multiple requests.</p>
<p>To use ASyncSession in your application code simply do the following.</p>
<p>- Initialise the code in your global.asax file</p>
<p><a href="http://www.davidcoombes.co/wp-content/uploads/2011/10/appstart_code.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2Fappstart_code.png','appstart_code')"><img class="alignnone size-full wp-image-160" title="appstart_code" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/appstart_code.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2Fappstart_code.png','appstart_code')" alt="" width="363" height="118" /></a></p>
<p>- Use the ASyncSession object in your ActionMethods</p>
<p>The below example Locks the session, reads an integer from the SessionState, increments it, puts it back and Unlocks the session.</p>
<p><a href="http://www.davidcoombes.co/wp-content/uploads/2011/10/actionmethod_example.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2Factionmethod_example.png','actionmethod_example')"><img class="alignnone size-full wp-image-174" title="actionmethod_example" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/actionmethod_example.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2Factionmethod_example.png','actionmethod_example')" alt="" width="605" height="484" /></a></p>
<p>Download my example MVC 3 application which demonstrates the use of the ASyncSession class.</p>
<p><strong>Download</strong></p>
<p><img class="size-full wp-image-84 alignleft" title="Download" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/Download.gif" alt="" width="20" height="20" /> <a title="Download" href="http://www.davidcoombes.co/?page_id=42" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2F%3Fpage_id%3D42','Download')">Download ASyncSession Example v1.00</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidcoombes.co/?feed=rss2&#038;p=151</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SplitMon v1.2</title>
		<link>http://www.davidcoombes.co/?p=103&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=splitmon-v1-2</link>
		<comments>http://www.davidcoombes.co/?p=103#comments</comments>
		<pubDate>Thu, 21 Oct 2010 19:38:44 +0000</pubDate>
		<dc:creator>David Coombes</dc:creator>
				<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.davidcoombes.co/?p=103</guid>
		<description><![CDATA[SplitMon is a virtual display utility that can divide your existing windows displays in a configurable number of virtual displays with varying resolutions. SplitMon has been developed to solve the spanning issue with RDP 5.1 when remotely connecting to a Windows XP machine. As the RDP protocol within Windows XP has no concept of multi [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.davidcoombes.co/wp-content/uploads/2011/10/LargeSplitMonTrans.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2FLargeSplitMonTrans.png','LargeSplitMonTrans')"><img class="alignleft size-full wp-image-104" title="LargeSplitMonTrans" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/LargeSplitMonTrans.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2FLargeSplitMonTrans.png','LargeSplitMonTrans')" alt="" width="104" height="82" /></a>SplitMon is a virtual display utility that can divide your existing windows displays in a configurable number of virtual displays with varying resolutions.</p>
<p>SplitMon has been developed to solve the spanning issue with RDP 5.1 when remotely connecting to a Windows XP machine. As the RDP protocol within Windows XP has no concept of multi displays, only a single monitor on your client can be used. The /span switch in the RDP client gives you the option of spanning the session across multiple screens but this is still viewed as one large display and does not mimic the multi monitor display setup you have on your client.</p>
<p>The screen shots below show the display properties of a physical XP machine with 2 displays and an XP machine remotely connected using the /span option of the RDP client from a client with 2 displays.</p>
<div><a href="http://www.davidcoombes.co/wp-content/uploads/2011/10/SingleDual.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2FSingleDual.png','SingleDual')"><img class="alignnone size-full wp-image-110" title="SingleDual" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/SingleDual.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2FSingleDual.png','SingleDual')" alt="" width="606" height="336" /></a><strong></strong></div>
<p>&nbsp;<br />
<strong>Configuration</strong></p>
<p>SplitMon runs as a Windows Service and can be installed and configured with the following command line options.<br />
<a href="http://www.davidcoombes.co/wp-content/uploads/2011/10/SplitMon12.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2FSplitMon12.png','SplitMon12')"><img class="alignnone size-full wp-image-114" title="SplitMon12" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/SplitMon12.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2FSplitMon12.png','SplitMon12')" alt="" width="463" height="433" /></a><br />
Example: To install SplitMon with 2 virtual displays of size 1280&#215;768 which controls the Microsoft RDP and Citrix ICA clients use the following command line.</p>
<p>SplitMon.exe -install -mc 2 -mr1 0,0,1280,1024,0,0,1280,996 -mr2 1280,0,2560,1280,1280,0,2560,1024 -ip mstsc.exe,pn.exe,wfica32.exe,wfcrun32.exe -er</p>
<p><strong>System Requirements</strong></p>
<p>Client : Windows 7, Windows Vista, Windows XP<br />
Server : Windows Server 2008 R2, Windows Server 2008, Windows Server 2003<br />
&nbsp;</p>
<p><strong>Download</strong></p>
<p><img class="size-full wp-image-84 alignleft" title="Download" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/Download.gif" alt="" width="20" height="20" /> <a title="Download" href="http://www.davidcoombes.co/?page_id=42" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2F%3Fpage_id%3D42','Download')">Download SplitMon v1.2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidcoombes.co/?feed=rss2&#038;p=103</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ThreadInfo v1.00</title>
		<link>http://www.davidcoombes.co/?p=93&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=threadinfo-v1-00</link>
		<comments>http://www.davidcoombes.co/?p=93#comments</comments>
		<pubDate>Fri, 31 Jul 2009 13:00:29 +0000</pubDate>
		<dc:creator>David Coombes</dc:creator>
				<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.davidcoombes.co/?p=93</guid>
		<description><![CDATA[ThreadInfo provides priority and CPU utilisation information of threads running on a Windows system. ThreadInfo details which process a thread belongs to, the processes base priority and the threads current running priority along with the percentage of CPU it consumed during the sample period. Usage Usage: ThreadInfo [-a][-v][-pid x][-r] [-t x][-admin] -a Show active threads [...]]]></description>
			<content:encoded><![CDATA[<p>ThreadInfo provides priority and CPU utilisation information of threads running on a Windows system.</p>
<p>ThreadInfo details which process a thread belongs to, the processes base priority and the threads current running priority along with the percentage of CPU it consumed during the sample period.</p>
<p><strong>Usage</strong></p>
<p>Usage: ThreadInfo [-a][-v][-pid x][-r] [-t x][-admin]</p>
<table border="0">
<tbody>
<tr>
<td>-a</td>
<td>Show active threads only</td>
</tr>
<tr>
<td>-v</td>
<td>Verbose output</td>
</tr>
<tr>
<td>-pid [x]</td>
<td>Show thread details of this process ID</td>
</tr>
<tr>
<td>-r</td>
<td>Enable sample repeat</td>
</tr>
<tr>
<td>-t [x]</td>
<td>Sample period in seconds</td>
</tr>
<tr>
<td>-admin</td>
<td>Run As Administrator</td>
</tr>
</tbody>
</table>
<p>&nbsp;<br />
<strong>System Requirements</strong></p>
<div>Client: Windows 7, Windows Vista, Windows XP</div>
<div>Server: Windows Server 2008 R2, Windows Server 2008, Windows Server 2003</div>
<p>&nbsp;</p>
<p><strong>Download</strong></p>
<p><img class="size-full wp-image-84 alignleft" title="Download" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/Download.gif" alt="" width="20" height="20" /> <a title="Download" href="http://www.davidcoombes.co/?page_id=42" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2F%3Fpage_id%3D42','Download')">Download ThreadInfo v1.00</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidcoombes.co/?feed=rss2&#038;p=93</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Memory Fragmentation</title>
		<link>http://www.davidcoombes.co/?p=16&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=virtual-memory-fragmentation</link>
		<comments>http://www.davidcoombes.co/?p=16#comments</comments>
		<pubDate>Mon, 13 Apr 2009 17:45:59 +0000</pubDate>
		<dc:creator>David Coombes</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://www.davidcoombes.co/?p=16</guid>
		<description><![CDATA[Virtual memory is a way of providing every running process with the same liner memory address space, all processes can allocate memory from the same virtual location as they are completely isolated from each other, an operating systems memory manager provides a translation from the processes virtual address space into the physical memory it occupies. [...]]]></description>
			<content:encoded><![CDATA[<p>Virtual memory is a way of providing every running process with the same liner memory address space, all processes can allocate memory from the same virtual location as they are completely isolated from each other, an operating systems memory manager provides a translation from the processes virtual address space into the physical memory it occupies.</p>
<p>On a 32-bit Windows operating system, every process is allocated a 4Gb virtual address space. On a standard system configuration this is split into 2 equal parts.</p>
<p>0&#215;00000000 – 0x7FFFFFF – 2Gb of user mode virtual address space applications can allocate for their own use.<br />
0&#215;80000000 – 0xFFFFFFFF – 2Gb of kernel mode virtual address space which contains the operating system image, device drivers, page frame umber (PFN) database, system page table entries (PTE’s), paged and nonpaged memory pools.</p>
<p>The user mode portion of the address space is unique to every running process giving every process up to 2Gb of memory to consume.</p>
<p>The kernel mode portion is shared and is mapped into every process. It’s for this reason people refer to the 32-bit 2Gb kernel memory limit as one of the main resource limitations in a Terminal Server / Citrix environment. Hundreds of users can be running thousands of processes all with their own 2Gb user mode address space, but all sharing the same 2Gb kernel mode space.</p>
<p>The /3GB boot.ini switch can alter the split giving each processes a 3Gb user mode virtual address space, limiting the shared kernel mode address space to 1Gb.</p>
<p>With 64-Bit Windows, virtual address space sizes have increased significantly. The current size of the user mode address space is 8192GB and system PTE, system cache, paged pool and nonpaged pool all having a 128GB allocation in kernel mode.</p>
<p>What is Fragmentation?</p>
<p>Fragmentation of any virtual address space occurs over time as more and more blocks of memory are allocated and freed. Memory allocations can only succeed in contiguous blocks of memory, for example if a 2mb allocation was requested it would be allocated from a complete contiguous 2mb block of virtual memory and not from a 1mb block at the start of the pool and a 1mb block at the end.</p>
<p>When a virtual address space is initially created all of it is available for allocation and requests are simply satisfied from the next available virtual address.</p>
<p><a href="http://www.davidcoombes.co/wp-content/uploads/2011/08/vmf1.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F08%2Fvmf1.png','vmf1')"><img class="alignnone size-full wp-image-33" title="vmf1" src="http://www.davidcoombes.co/wp-content/uploads/2011/08/vmf1.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F08%2Fvmf1.png','vmf1')" alt="" width="505" height="48" /></a></p>
<p>(Fig 1 – 3 memory allocations consuming 80mb of a 160mb virtual address space)</p>
<p>Fragmentation only begins to occur when memory allocations are freed.</p>
<p><a href="http://www.davidcoombes.co/wp-content/uploads/2011/08/vmf2.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F08%2Fvmf2.png','vmf2')"><img class="alignnone size-full wp-image-34" title="vmf2" src="http://www.davidcoombes.co/wp-content/uploads/2011/08/vmf2.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F08%2Fvmf2.png','vmf2')" alt="" width="505" height="48" /></a></p>
<p>(Fig 2 – 2 more blocks have been allocated and a 3rd 20mb block freed)</p>
<p>Fig 2 shows a single fragmentation of 20Mb. Blocks of free space in between allocations can be reused providing the requested allocation is small enough to fit. Figure 3 below shows the 20mb fragmentation reused by 2 additional 10mb allocations.</p>
<p><a href="http://www.davidcoombes.co/wp-content/uploads/2011/08/vmf3.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F08%2Fvmf3.png','vmf3')"><img class="alignnone size-full wp-image-35" title="vmf3" src="http://www.davidcoombes.co/wp-content/uploads/2011/08/vmf3.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F08%2Fvmf3.png','vmf3')" alt="" width="505" height="48" /></a></p>
<p>(Fig 3 – 2 additional 10mb allocations have reused the 20mb fragmentation)</p>
<p>So when does fragmentation become a problem?</p>
<p><a href="http://www.davidcoombes.co/wp-content/uploads/2011/08/vmf4.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F08%2Fvmf4.png','vmf4')"><img class="alignnone size-full wp-image-36" title="vmf4" src="http://www.davidcoombes.co/wp-content/uploads/2011/08/vmf4.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F08%2Fvmf4.png','vmf4')" alt="" width="505" height="48" /></a><br />
(Fig 4 – 7 allocations consuming 80mb of the 160mb virtual address space)</p>
<p>When an address space becomes very fragmented it can cause larger memory allocations to fail as there is not enough contiguous space to satisfy the request. Take Figure 4 as an example, as the address space is fairly fragmented the largest single allocation possible is 30mb, anything larger would fail even though there is a total of 80mb available for allocation in the address space. 8 allocations of 10mb would succeed where as 2 allocations of 40mb would fail.</p>
<p>Is this a problem?</p>
<p>Typically a user would never have problems with fragmentation, in user mode a process would need to allocate close to the 2Gb limit (x86), before experiencing any problems, it also depends on how an application developer has written their application. For example a 10kb buffer is required to perform an operation which will be repeated several thousand times. Does the developer allocate the 10kb buffer once when the program starts, or does it get allocated and freed each time it is required. The more memory allocations an application performs the more fragmented the address space can become.</p>
<p>Memory allocation failures due to fragmentation are most often seen in the kernel mode address space specifically in the paged and nonpaged system memory pools. As these 2 pools are used by almost every component in all operations performed in kernel mode they can become exhausted and very fragmented especially under workloads such as Terminal Services. I have seen examples of users failing to connect to a Citrix XenApp server because the ICA remote display driver could not allocate 400Kb of paged pool memory even though there was more than 30mb available at the time.</p>
<p>What can be done?</p>
<p>Today there is not a lot that can be done to resolve this. When memory allocations succeed a pointer to the start of the memory block is returned, if Microsoft were to implement background memory defragmentation routines, the original returned memory pointers would change as a result. There are no notification methods available in Windows to signal processes that memory allocations have moved. Windows applications assume the address given after a successful memory allocation is valid and will not change until it is freed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidcoombes.co/?feed=rss2&#038;p=16</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AllocatePool v1.00</title>
		<link>http://www.davidcoombes.co/?p=82&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=allocatepool-v1-00</link>
		<comments>http://www.davidcoombes.co/?p=82#comments</comments>
		<pubDate>Mon, 13 Apr 2009 10:30:11 +0000</pubDate>
		<dc:creator>David Coombes</dc:creator>
				<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.davidcoombes.co/?p=82</guid>
		<description><![CDATA[Allocate Pool is a utility for the 32-bit edition of Windows Server 2003 which allows you to allocate memory from two of the kernel mode system memory pools, paged and nonpaged pool. Paged and nonpaged pool are both regions of virtual memory located in the system part of address space. Kernel mode components such as [...]]]></description>
			<content:encoded><![CDATA[<p>Allocate Pool is a utility for the 32-bit edition of Windows Server 2003 which allows you to allocate memory from two of the kernel mode system memory pools, paged and nonpaged pool.</p>
<p>Paged and nonpaged pool are both regions of virtual memory located in the system part of address space. Kernel mode components such as device drivers use these pools to allocate system memory. These two pools are often one of the first resources to become exhausted in a Terminal Server environment, in fact with today’s hardware they are often the limiting factor to how many concurrent users can be logged on to a server.</p>
<p>There are several tools available to determine the size and available memory from each pool such as WinDbg and Poolmon. However it is not always possible to allocate all the available memory. See my <a title="Virtual Memory Fragmentation" href="http://www.davidcoombes.co/?p=16" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2F%3Fp%3D16','Virtual+Memory+Fragmentation')">article</a> on virtual memory fragmentation to understand why it may not be possible to allocate all available virtual memory.</p>
<p><strong>Configuration</strong></p>
<p>The configuration dialog allows you to select either paged or nonpaged pool memory, the number of allocations to perform and the size of each allocation. Allocate Pool reports on the number of allocations which succeed and fail.</p>
<p><a href="http://www.davidcoombes.co/wp-content/uploads/2011/10/AllocatePool.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2FAllocatePool.png','AllocatePool')"><img class="alignnone size-full wp-image-83" title="AllocatePool" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/AllocatePool.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2FAllocatePool.png','AllocatePool')" alt="" width="405" height="216" /></a></p>
<p><strong>System Requirements</strong></p>
<div>Client: Not Supported</div>
<div>Server: Windows Server 2003 ( 32-bit only )</div>
<p>&nbsp;</p>
<p><strong>Download</strong></p>
<p><img class="size-full wp-image-84 alignleft" title="Download" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/Download.gif" alt="" width="20" height="20" /> <a title="Download" href="http://www.davidcoombes.co/?page_id=42" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2F%3Fpage_id%3D42','Download')">Download AllocatePool v1.00</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidcoombes.co/?feed=rss2&#038;p=82</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OnTop V1.00</title>
		<link>http://www.davidcoombes.co/?p=77&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ontop-v1-00</link>
		<comments>http://www.davidcoombes.co/?p=77#comments</comments>
		<pubDate>Tue, 10 Mar 2009 20:26:15 +0000</pubDate>
		<dc:creator>David Coombes</dc:creator>
				<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.davidcoombes.co/?p=77</guid>
		<description><![CDATA[OnTop is a Windows utility that allows you to select any desktop window to be always on top. Select any window on your desktop and using your 2 registered hot keys you can force the window to be always on top or to follow the windows z-order. &#160; Configuration The configuration dialog allows you to [...]]]></description>
			<content:encoded><![CDATA[<p>OnTop is a Windows utility that allows you to select any desktop window to be always on top.</p>
<p>Select any window on your desktop and using your 2 registered hot keys you can force the window to be always on top or to follow the windows z-order.</p>
<p>&nbsp;</p>
<p><strong>Configuration</strong></p>
<p>The configuration dialog allows you to select 2 system-wide host keys of your choice. When the dialog is closed the selected hot keys are immediately activated.</p>
<p><a href="http://www.davidcoombes.co/wp-content/uploads/2011/10/OnTop.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2FOnTop.png','OnTop')"><img class="alignnone size-full wp-image-79" title="OnTop" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/OnTop.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F10%2FOnTop.png','OnTop')" alt="" width="364" height="283" /></a></p>
<p>A notification area balloon tip provides details of the windows you make OnTop.</p>
<p>&nbsp;</p>
<p><strong>System Requirements</strong></p>
<p>Client : Windows 7, Windows Vista, Windows XP</p>
<p>Server : Windows Server 2008 R2, Windows Server 2008, Windows Server 2003<br />
&nbsp;</p>
<p><strong>Download</strong></p>
<p><img class="size-full wp-image-84 alignleft" title="Download" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/Download.gif" alt="" width="20" height="20" /> <a title="Download" href="http://www.davidcoombes.co/?page_id=42" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2F%3Fpage_id%3D42','Download')">Download OnTop v1.00</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidcoombes.co/?feed=rss2&#038;p=77</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graphical Media Player V1.0</title>
		<link>http://www.davidcoombes.co/?p=39&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=graphical-media-player-v1-0</link>
		<comments>http://www.davidcoombes.co/?p=39#comments</comments>
		<pubDate>Tue, 10 Mar 2009 17:00:22 +0000</pubDate>
		<dc:creator>David Coombes</dc:creator>
				<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.davidcoombes.co/?p=39</guid>
		<description><![CDATA[Graphical Media Player (GMP) is an mp3 / m4a audio player featuring a spectrum analyser, oscilloscope and power bars. As an audio player it has the basic controls you would expect including play, pause, stop, next, previous, repeat and shuffle. There are 3 defined views. Normal mode which combines the spectrum analyser and play list, [...]]]></description>
			<content:encoded><![CDATA[<p>Graphical Media Player (GMP) is an mp3 / m4a audio player featuring a spectrum analyser, oscilloscope and power bars. As an audio player it has the basic controls you would expect including play, pause, stop, next, previous, repeat and shuffle.</p>
<p>There are 3 defined views. Normal mode which combines the spectrum analyser and play list, Compact mode which hides the play list and a Mini mode which displays a smaller spectrum analyser window. Although GMP has these 3 built-in views the window is completely resizable.</p>
<div>GMP’s play list shows details about songs added to the queue. If available the title, artist, album and length of each song is displayed. Any number of songs can be added to the play list but it is not currently possible to sort the list, they are displayed in the order they are added.</div>
<div>
<br />
<a href="http://www.davidcoombes.co/wp-content/uploads/2011/08/GCM4.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F08%2FGCM4.png','GCM4')"><img class="alignnone size-full wp-image-67" title="GCM4" src="http://www.davidcoombes.co/wp-content/uploads/2011/08/GCM4.png" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2Fwp-content%2Fuploads%2F2011%2F08%2FGCM4.png','GCM4')" alt="" width="471" height="448" /></a></div>
<p>&nbsp;</p>
<p><strong>Spectrum Analyser</strong></p>
<div>Spectrum Analysers are used to display frequencies of sound contained in a sample of music. This can range from a single frequency generated by a tuning fork to several 100 different frequencies being played at the same time in a digital audio file.</div>
<div>GMP’s spectrum analyzer uses a time domain to frequency domain conversion method known as a Fast Fourier Transform (FFT) to convert digital sign waves into frequencies bands. GMP implements a variation of the FFT known as a Short Time Fourier Transfer (STFT) where the sample window shifts along the data stream at smaller intervals than the sample size creating an overlapping effect. The resulting complex numbers (real and imaginary) are held in a matrix which stores the frequencies magnitude and phase for the particular point in time in which the sample was taken.</div>
<div>The spectrum analyzer has 2 separate channels (left and right), each consisting of 23 frequencies bands which represent a range of frequencies.  Band 11 in each channel is set to the note A4 or 440Hz and each band below decreases by 2 semi-tones and each band above increases by 4 semi-tones.</div>
<p>Band 0 contains frequencies 123.470Hz – 138.590Hz, band 1 contains frequencies 138.591Hz – 155.563Hz and so on. A semitone calculated in Hz is a twelfth root of two, or written in C as dbSemiTone = pow( 2.0f, ( 1.0f / 12.0f ) );.</p>
<p>The table below shows the frequency range of each band:-</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="54">
<div># Band</div>
</td>
<td valign="top" width="104">
<div>Frequency (Hz)</div>
</td>
<td valign="top" width="47">
<div>Note</div>
</td>
<td valign="top" width="57">
<div># Band</div>
</td>
<td valign="top" width="104">
<div>Frequency (Hz)</div>
</td>
<td valign="top" width="47">
<div>Note</div>
</td>
</tr>
<tr>
<td valign="top" width="54">
<div>0</div>
</td>
<td valign="top" width="104">
<div>123.470</div>
</td>
<td valign="top" width="47">
<div>B2</div>
</td>
<td valign="top" width="57">
<div>12</div>
</td>
<td valign="top" width="104">
<div>554.365</div>
</td>
<td valign="top" width="47">
<div>C#5</div>
</td>
</tr>
<tr>
<td valign="top" width="54">
<div>1</div>
</td>
<td valign="top" width="104">
<div>138.591</div>
</td>
<td valign="top" width="47">
<div>C#3</div>
</td>
<td valign="top" width="57">
<div>13</div>
</td>
<td valign="top" width="104">
<div>698.456</div>
</td>
<td valign="top" width="47">
<div>F5</div>
</td>
</tr>
<tr>
<td valign="top" width="54">
<div>2</div>
</td>
<td valign="top" width="104">
<div>155.563</div>
</td>
<td valign="top" width="47">
<div>D#3</div>
</td>
<td valign="top" width="57">
<div>14</div>
</td>
<td valign="top" width="104">
<div>880.000</div>
</td>
<td valign="top" width="47">
<div>A5</div>
</td>
</tr>
<tr>
<td valign="top" width="54">
<div>3</div>
</td>
<td valign="top" width="104">
<div>174.613</div>
</td>
<td valign="top" width="47">
<div>F3</div>
</td>
<td valign="top" width="57">
<div>15</div>
</td>
<td valign="top" width="104">
<div>1108.731</div>
</td>
<td valign="top" width="47">
<div>C#6</div>
</td>
</tr>
<tr>
<td valign="top" width="54">
<div>4</div>
</td>
<td valign="top" width="104">
<div>195.997</div>
</td>
<td valign="top" width="47">
<div>G3</div>
</td>
<td valign="top" width="57">
<div>16</div>
</td>
<td valign="top" width="104">
<div>1396.914</div>
</td>
<td valign="top" width="47">
<div>F6</div>
</td>
</tr>
<tr>
<td valign="top" width="54">
<div>5</div>
</td>
<td valign="top" width="104">
<div>219.999</div>
</td>
<td valign="top" width="47">
<div>A3</div>
</td>
<td valign="top" width="57">
<div>17</div>
</td>
<td valign="top" width="104">
<div>1760.001</div>
</td>
<td valign="top" width="47">
<div>A6</div>
</td>
</tr>
<tr>
<td valign="top" width="54">
<div>6</div>
</td>
<td valign="top" width="104">
<div>246.941</div>
</td>
<td valign="top" width="47">
<div>B3</div>
</td>
<td valign="top" width="57">
<div>18</div>
</td>
<td valign="top" width="104">
<div>2217.463</div>
</td>
<td valign="top" width="47">
<div>C#7</div>
</td>
</tr>
<tr>
<td valign="top" width="54">
<div>7</div>
</td>
<td valign="top" width="104">
<div>277.182</div>
</td>
<td valign="top" width="47">
<div>C#4</div>
</td>
<td valign="top" width="57">
<div>19</div>
</td>
<td valign="top" width="104">
<div>2793.892</div>
</td>
<td valign="top" width="47">
<div>F7</div>
</td>
</tr>
<tr>
<td valign="top" width="54">
<div>8</div>
</td>
<td valign="top" width="104">
<div>311.126</div>
</td>
<td valign="top" width="47">
<div>D#4</div>
</td>
<td valign="top" width="57">
<div>20</div>
</td>
<td valign="top" width="104">
<div>3520.005</div>
</td>
<td valign="top" width="47">
<div>A7</div>
</td>
</tr>
<tr>
<td valign="top" width="54">
<div>9</div>
</td>
<td valign="top" width="104">
<div>349.228</div>
</td>
<td valign="top" width="47">
<div>F4</div>
</td>
<td valign="top" width="57">
<div>21</div>
</td>
<td valign="top" width="104">
<div>4424.930</div>
</td>
<td valign="top" width="47">
<div>C#8</div>
</td>
</tr>
<tr>
<td valign="top" width="54">
<div>10</div>
</td>
<td valign="top" width="104">
<div>391.995</div>
</td>
<td valign="top" width="47">
<div>G4</div>
</td>
<td valign="top" width="57">
<div>22</div>
</td>
<td valign="top" width="104">
<div>5587.663</div>
</td>
<td valign="top" width="47">
<div>F8</div>
</td>
</tr>
<tr>
<td valign="top" width="54">
<div>11</div>
</td>
<td valign="top" width="104">
<div>440</div>
</td>
<td valign="top" width="47">
<div>A4</div>
</td>
<td valign="top" width="57"></td>
<td valign="top" width="104"></td>
<td valign="top" width="47"></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Spectral Leakage is a term given to the effect of applying an FFT on an incomplete or offset sign wave; the calculated frequencies appear to span several frequency bands making it impossible to determine its exact frequency. Ideally when applying an FFT, the sample data will contain sign waves that start and end at 0. As this is not always the case a windowing algorithm is applied to the sample before it is put through an FFT. The effect of the windowing function reduces spectral leakage resulting in a more accurate frequency conversion.</p>
<p>GMP currently implements two different windowing functions. The left channel uses a 3-term Blackman-Harris window and the right channel uses a Hanning window.</p>
<p><strong>System Requirements</strong></p>
<div>Direct X, Sound Card</div>
<div>Client: Windows 7, Windows Vista, Windows XP</div>
<div>Server: Windows Server 2008, Windows Server 2003</div>
<p>&nbsp;</p>
<p><strong>Download</strong></p>
<p><img class="size-full wp-image-84 alignleft" title="Download" src="http://www.davidcoombes.co/wp-content/uploads/2011/10/Download.gif" alt="" width="20" height="20" /> <a title="Download" href="http://www.davidcoombes.co/?page_id=42" onclick="return TrackClick('http%3A%2F%2Fwww.davidcoombes.co%2F%3Fpage_id%3D42','Download')">Download Graphical Media Player v1.00</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidcoombes.co/?feed=rss2&#038;p=39</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

