I'm sorry if it offends you, but that honestly was my experience of Windows back when I used it. For example at one point I was using Win32::OLE to drive IE to load a website then print it to a postscript file. (That was then passed through ps2pdf to get a PDF version of the web page.) I was using the option to tell IE to do the print but not pop up an alert. It would work about, say, 99.9% of the time. But one time in a thousand the alert did come up.

I got around it by making nothing else dependent on that job finishing in a timely manner, emailing someone if the alert came up, then having someone manually check that alert every week or two. Oh, and I pushed the person who developed the web page to make a standards compliant version so that we could just use html2pdf and get rid of the Windows dependency. (That happened about 6 months later, and I was very glad when it happened.)

According to Microsoft, every layer from Win32::OLE on was part of and integrated with Windows. Including IE. So when I say that this was non-deterministic behaviour within Windows, I am using Microsoft's definition of Windows. I do not know why it happened. It "smells like" a race condition but I cannot prove that.

Admittedly this was some years ago. As you may know, I avoid dealing with Windows whenever I can. The problems may have all gone away, and I wouldn't know.

However I doubt it. Every so often I hear stories that confirm my low opinions. For instance with the initial release of Vista I heard complaints from people testing it that they couldn't get the same result twice from an install. More specifically, they could script an install of the whole OS and applications. Start with 2 factory machines that were supposedly identical. Do identical installs. And they would wind up with 2 machines that would misbehave in different ways. Of course this was before Vista was in wide release and I am sure it has improved since, but still a non-deterministic install process does not inspire confidence.

If I was to guess a cause for these problems, I would say that it is a combination of heavy multi-threading and a dysfunctional development process. If you want to know about the latter, you could do worse than to occasionally read the discussions from insiders at http://minimsft.blogspot.com/. I know we disagree on multi-threading, but read through The Problem with Threads and tell me whether you can honestly disagree with the technical content of that paper. (I know you will disagree with the tone, so please identify technical content you disagree with.)

A second cause of problems is that behaviour may be deterministic, but is affected by things outside of our knowledge. DLL hell comes to mind as a common cause, but it is far from being the only one. For instance many home users have no idea when their computer is captured and made part of a bot net. How many of us don't know someone whose computer mysteriously got corrupted and crashed? How often is it because of computer viruses and worms? Even if the behaviour is deterministic, from the operator's point of view, it isn't. If you're like my nanny your computer starts off fine, gets slow, then at some point won't turn on. For no apparent reason.

And before you say it, yes I know that other operating systems like Linux use multi-threading. However by and large they use it less than Windows does. YAnd their internal development processes seem to be in better shape. Yes, they have security problems. But those are less exploited than Windows is. The result that I haven't experienced a similar amount of pain from non-deterministic behaviour on Linux that I remember from Windows.


In reply to Re^7: Time::HiRes sleep does not always work by tilly
in thread Time::HiRes sleep does not always work by tone

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.