<?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>race condition &#8211; Startupware: Managing Startups</title>
	<atom:link href="https://www.startupware.com/tag/race-condition/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.startupware.com</link>
	<description>Autorunning Software &#38; Running a Software Business</description>
	<lastBuildDate>Fri, 04 Jan 2019 15:09:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Why Does Windows Act Weird?</title>
		<link>https://www.startupware.com/newsletter-reprints/why-does-windows-act-weird/</link>
		
		<dc:creator><![CDATA[Jerry Stern]]></dc:creator>
		<pubDate>Fri, 04 Jan 2019 15:09:47 +0000</pubDate>
				<category><![CDATA[Newsletter Reprints]]></category>
		<category><![CDATA[computer configuration]]></category>
		<category><![CDATA[race condition]]></category>
		<category><![CDATA[Windows 10]]></category>
		<guid isPermaLink="false">https://www.startupware.com/?p=1910</guid>

					<description><![CDATA[<p>A lot of Windows weirdness is from a technology term called a ‘race event', like a speed race between lots of programs all trying to compete together. </p>
<p>The post <a rel="nofollow" href="https://www.startupware.com/newsletter-reprints/why-does-windows-act-weird/">Why Does Windows Act Weird?</a> appeared first on Startupware.com. Visit to read more about software design, malware, and computer security.</p>
]]></description>
										<content:encoded><![CDATA[
<p>
A lot of Windows weirdness is from a 
technology term called a ‘race event&#8217;, like a speed race between lots of
 programs all trying to compete together. Basically, that&#8217;s when 
software does a few things, and expects to get feedback, answers, or 
results from those things, and those result arrive in an unexpected 
order because other software is overwhelming the system. The program 
doesn&#8217;t know what to do with that, and either triggers an error message,
 or locks up. Once a program locks up, it remains in memory, and Windows
 doesn&#8217;t always know that has happened. And then you see this:

</p>



<figure class="wp-block-image"><img decoding="async" src="https://www.pc410.com/art/2018/ShutDown.jpg" alt=""/></figure>



<p>Translation: &#8220;The message that says 
that Windows is ‘ShuttingDown&#8217; isn&#8217;t shutting itself down, so Windows 
can&#8217;t shut down. Do you want to ignore &#8220;ShuttingDown&#8221; and shut down 
before Restarting, uh, Anyway?&#8221;</p>



<p>In the early days of personal  computers, we had MS-DOS, the old Microsoft Disk Operating System. It  could run one program and do one thing at a time. Multi-tasking (walking  and chewing gum at the same time, or the computer equivalent), wasn&#8217;t  possible at first. So a program could do this:<br /> <code>Print 'hello '<br /> Print 'world'</code><br /> And that would reliably print ‘hello world&#8217; on some device, usually a monitor, or a sometimes a printer.</p>



<p>But somewhere around 1994, where we had
 the model 80386 processors and Windows 3.11, computer chips and 
software gained the ability to ‘time-share&#8217; so that programs could take 
turns running on the processor, and could do things without waiting for 
another program. That makes a few assumptions: All programs involved 
follow the rules, the operating system does everything right, and the 
hardware is functioning normally.&nbsp;</p>



<p>And if it doesn&#8217;t, well, we might see  ‘worldhello ‘ instead. That&#8217;s a very basic failure of a race condition.  Each line of code worked correctly, but the results are out of order.  Far more likely: gibberish output and broken Windows.</p>



<figure class="wp-block-image"><img decoding="async" src="https://www.pc410.com/art/2018/BrokenWindowsCop.jpg" alt=""/></figure>



<p>Since then, we&#8217;ve gained multi-core 
processors that can run far more programs at the same time. We have 
‘services&#8217; that run in the background, loading the Internet 
(communications), antivirus, system monitoring, video enhancements, 
surround sound, backups, phone-homes for both good and bad reasons, and 
on and on. As I write this, my computer shows 7 programs running, and 60
 background processes (mostly services) either working or waiting for 
things to do.&nbsp; CPU load is at 2%, so this is normal operation for a 
modern PC with this year&#8217;s specifications.</p>



<p>But what happens if we add a few more 
antivirus programs and have them monitor all incoming web pages&nbsp;and 
email? Well, they all try to do things at the same time, and things slow
 down dramatically. Add some more stuff, like browser toolbars, which 
mostly run all day long. Or view a web page that&nbsp; automatically plays 
videos when you arrive, maybe serveral animated advertisements and a 
full-motion video. At some point, the software overwhelms what the 
hardware can deliver, either too much for the processor to calculate or 
too much internet content to pull down. Pieces are skipped. Videos are 
time-sensitive; if the image pieces show up out of order, the image 
looks blocky or garbled. Error messages can occur if the programs 
involved don&#8217;t know what to do with contents that are delayed, damaged, 
or out of order. Video programs know how to lower resolution or skip 
frames, so they can self-repair, to some extent.</p>



<p>Error messages, however, are written by
 humans, in advance. How do we do that? Well, the code is something like
 this, where lines 2 and 4 are ‘error traps&#8217;:</p>



<p><code>Print 'hello ' (</code>and listen for an error number)<br />
<code>If error number received is 6, display 'Printer wants paper.'<br />
Print 'world'<br />
If any error received, display 'Unknown error after printing.'</code></p>



<p>OK, so that works unless there is an 
error that wasn&#8217;t expected at the time that it arrived. Most error 
messages say what the programmer thought was the obvious error that 
would happen after a specific line in a program. That&#8217;s when something 
happens, not what. It&#8217;s a guess.</p>



<p>Now multiply that by those 60 services 
and 7 programs that are running or waiting. Add some program code with 
incomplete error traps, or some software phoning home for advertising. 
The work area (memory) of the computer becomes messy and unstable, as 
programs receive web content or hardware status messages out of order, 
as&nbsp;gibberish, or not at all. In a severe case, the computer just locks 
up. But Windows does a fair job of cleaning up junk in memory, so what 
you see may simply be unexpected garbage.</p>



<p>So what does this mean for a computer user?</p>



<ul class="wp-block-list"><li>Error messages tell you more about when something happened than what went wrong.</li><li>Overloaded Windows gets weird.</li><li>Programmers can&#8217;t anticipate all delays or every possible error.</li><li>Software doesn&#8217;t deal with traffic jams well.</li><li>Waiting for Windows to recover from an error works, sometimes. If you don&#8217;t expect miracles.</li></ul>



<p>And for things to do:</p>



<ul class="wp-block-list"><li>Refresh can help a browser program like Firefox or Chrome when the 
page looks like junk because it didn&#8217;t load completely. Press either F5,
 or Ctrl-R.</li><li>Rebooting a computer clears memory and work areas. (Washes the blackboard.)</li><li>Uninstall software that is no longer needed.</li><li>Avoid installing software that runs all the time.</li></ul>
<p>The post <a rel="nofollow" href="https://www.startupware.com/newsletter-reprints/why-does-windows-act-weird/">Why Does Windows Act Weird?</a> appeared first on Startupware.com. Visit to read more about software design, malware, and computer security.</p>
<p>Original article: <a href="https://www.startupware.com/newsletter-reprints/why-does-windows-act-weird/">Why Does Windows Act Weird?</a>.</p>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
