Slashdot Mirror


Developer Explains Why All Windows Drivers Are Dated June 21, 2006 (microsoft.com)

For years, people have wondered why all Windows drivers are dated June 21, 2006. Long time developer at Microsoft, Raymond Chen explains (much of the entire post in summary): When the system looks for a driver to use for a particular piece of hardware, it ranks them according to various criteria. If a driver provides a perfect match to the hardware ID, then it becomes a top candidate. And if more than one driver provides a perfect match, then the one with the most recent timestamp is chosen. If there is still a tie, then the one with the highest file version number is chosen. Suppose that the timestamp on the driver matched the build release date. And suppose you had a custom driver provided by the manufacturer. When you installed a new build, the driver provided by Windows will have a newer timestamp than the one provided by the manufacturer. Result: When you install a new build, all your manufacturer-provided drivers get replaced by the Windows drivers. Oops. Intentionally backdating the drivers avoids this problem. It means that if you have a custom manufacturer-provided driver, it will retain priority over the Windows-provided driver. On the other hand, if your existing driver was the Windows-provided driver from an earlier build, then the third-level selection rule will choose the one with the higher version number, which is the one from the more recent build. It all works out in the end, but it does look a bit funny.

18 of 236 comments (clear)

  1. An insanely clever solution, Microsoft-style. by Anonymous Coward · · Score: 5, Insightful

    Why don't they simply add another record ("source") to help make the driver comparison? A typical Microsoft solution I would say.

    1. Re:An insanely clever solution, Microsoft-style. by Opportunist · · Score: 5, Funny

      Your idea would be easy to implement, a perfect solution to the problem and most of all it would work. We can't have that at MS.

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
  2. Seriously... What a nightmare computing has become by Anonymous Coward · · Score: 5, Insightful

    . Maybe it's all the weed talking, but I've really lost the will to even attempt to understand all the insane complexity of modern PCs. I feel like I do nothing but constantly deal with all sorts of bizarre glitches and software harassing me in numerous ways, to the point where I mostly use the computer for the sake of maintaining itself, rather than any actual work.

    That's not how it was back in the Amiga days.

  3. badly designed by edxwelch · · Score: 5, Insightful

    Seems like a really badly designed system to me. If the time stamp of a driver somehow got changed by accident, it would lead to a very hard to find problem.

  4. There's a word for this by Geoffrey.landis · · Score: 4, Informative

    There's a word for this method of solving a problem: it's a kluge.

    --
    http://www.geoffreylandis.com
    1. Re:There's a word for this by flopsquad · · Score: 4, Funny

      Kluge: An ordinary high-speed death toboggan, but with KDE graphical interface. Those who prefer GNOME on their bullet sleds might call it a "kludge."

      --
      Nothing posted to /. has ever been legal advice, including this.
    2. Re:There's a word for this by lgw · · Score: 4, Informative

      Is that a new word or are we re-spelling the long-established word "kludge"?

      Nope. Kluge is the right spelling, and the right pronunciation. The Jaron File speaks thusly:

      Nowadays this term is often encountered in the variant spelling 'kludge'. Reports from old farts are consistent that 'kluge' was the original spelling, reported around computers as far back as the mid-1950s and, at that time, used exclusively of hardware kluges. In 1947, the New York Folklore Quarterly reported a classic shaggy-dog story 'Murgatroyd the Kluge Maker' then current in the Armed Forces, in which a 'kluge' was a complex and puzzling artifact with a trivial function. Other sources report that 'kluge' was common Navy slang in the WWII era for any piece of electronics that worked well on shore but consistently failed at sea.
      . . .
      TMRC and the MIT hacker culture of the early '60s seems to have developed in a milieu that remembered and still used some WWII military slang (see also foobar). It seems likely that 'kluge' came to MIT via alumni of the many military electronics projects that had been located in Cambridge (many in MIT's venerable Building 20, in which TMRC is also located) during the war.

      The variant 'kludge' was apparently popularized by the Datamation article mentioned under kludge; it was titled How to Design a Kludge (February 1962, pp. 30, 31). This spelling was probably imported from Great Britain, where kludge has an independent history (though this fact was largely unknown to hackers on either side of the Atlantic before a mid-1993 debate in the Usenet group alt.folklore.computers over the First and Second Edition versions of this entry; everybody used to think kludge was just a mutation of kluge). It now appears that the British, having forgotten the etymology of their own 'kludge' when 'kluge' crossed the Atlantic, repaid the U.S. by lobbing the 'kludge' orthography in the other direction and confusing their American cousins' spelling!

      --
      Socialism: a lie told by totalitarians and believed by fools.
  5. Re:Wow by Scarred+Intellect · · Score: 5, Insightful

    Seems to me it would be easier and more maintainable to check the author of the driver and give precedence to NVidia drivers over Microsoft drivers rather than back-dating your own...but maybe that's why I'm not a Microsoft software engineer, they obviously know more than me.

  6. A bit here a bit there by goombah99 · · Score: 4, Interesting

    Right. A bit here a bit there and pretty soon you have saved a whole byte. Overloading the date value with multiple meanings is so 1980s programming. Maybe they could also start using special dates for other meanings too! that way they could save another bit somewheres

    --
    Some drink at the fountain of knowledge. Others just gargle.
  7. Typical Microsoft kludge by OneSmartFellow · · Score: 5, Interesting

    So, if the hardware provider creates a driver too, why does MS use the "perfect match hardware ID".. Why not a system where the manf. Hardware ID is X.Y.Z.Pref  (or some other identifier which would supersede the Microsoft version) and Microsoft's would then be X.Y.Z.Microsoft.  Then it's really obvious what's going on, it doesn't rely upon checking for date, or version ID, or other in-exact ways of *guessing* which driver to use.<br><br>
    Why ?<br>
    Because, the vast majority of devs at MS can't think straight about anything - that's why we have the current state of Windows.  MS hasn't hired a good developer since the days of Windows NT.

  8. Programming the Windows Driver Model by monkeyxpress · · Score: 5, Interesting

    I realise the driver system in windows has moved along (hopefully for the better) a lot recently, but about 15 years ago I remember looking into developing a custom driver for a USB device I had developed. My background was as an embedded developer so I had a detailed knowledge of how the bits on the bus worked, and what the host controller chip was doing. All I wanted to do was send some packets to my device and receive a few packets back from a windows application - nothing real time or taxing of the system's capabilities.

    I got a copy of Walter Oney's windows driver model book, and proceeded to work my way through it.

    Even now, as someone who does a fair amount of web development, working my way through ten years of terrible javascript language and library designs decisions to make otherwise simple things happen on a webpage, it still shocks me just how ridiculously horrible the WDM was. The basic IRP system was already pretty over the top architectural astronauty, but I guess you could accept that they had to provide for the possibility that there would be a lot of fancy new peripherals in the future. But once you figured that out, the book went into how incredibly broken the model was once you had to support multi-processor system and plug and play. What ensued was basically 200 pages describing the most horrible mess of obscure synchronisation problems you could possibly find in a couple of pages worth of driver code.

    Ever since I ceased being shocked when my computer BSOD due to a third party driver. Frankly, if the thing allowed you to get much done at all, whoever wrote the driver probably deserved a medal or something.

    Anyway, with such an experience, this back dating driver thing doesn't surprise me in the slightest.

    1. Re:Programming the Windows Driver Model by ShooterNeo · · Score: 4, Interesting

      I'm doing embedded work. I've noticed (and done myself) that there is a way to dodge this issue. What you do is, you stick an FTDI chip at the front end. USB to serial is the easiest, but if you need more bandwidth, you can do USB to SPI. So FTDI manages the drivers, and most windows (and Linux) PCs are going to have valid FTDI drivers in them from OS install. You then either access the chip by having it map to a comm port or there is a way to link to FTDI's drivers.

      Either way, you export the problem - FTDI worries about writing and maintaining the driver, which hundreds of millions of devices depend on, and you just piggy back on that driver for your gadget. Works great and you can be up and running in under a day. (just use their USB to serial one, and connect RX and TX, and use the scanf/printf which most any microcontroller has support for)

  9. Well, it was either that, or... by Oxygen99 · · Score: 5, Funny

    Prefix all their drivers with AARDVARK_

    --
    I had a dream, bright and carefree, but now there's doubt and gravity
  10. Re:But why that date? by somenickname · · Score: 5, Funny

    It's Windows, so, they probably do something nutty like compute epoch time as an offset from 2006. Since 1970 would be a negative number, some deep and dark timestamp code somewhere in the driver model probably (correctly) assumes the timestamp is unsigned so, 1970 is actually far into the future.

  11. Re:Wrong Priority by ShooterNeo · · Score: 5, Interesting

    Yeah that's what I don't get. Why doesn't version number take precedence over time stamp? Why isn't the time stamp the date the manufacturer driver got Windows Certified? If you think about it, the last windows certified driver is going to be the one you want, from the perspective of an OS updater you want the latest version from the most stable branch.

  12. 1980 for DOS, 1970 Unix Aways ten years behind. by raymorris · · Score: 5, Informative

    1970 is the epoch for Unix, 1980 for DOS, because Microsoft is always ten years behind Unix.

    Windows actually has a shitload of different epochs. Some of their filesystems use 1980, some use 1601
    1980, Excel uses January 0, 1900, some versions of their compiler use 12-30-1899, COM uses 12-31-1899. It's a real cluster fuck.

  13. The goal of MS drivers was to kill WordPerfect by 140Mandak262Jamuna · · Score: 5, Informative
    Many people are posting why the windows driver model sucks and how terrible it is etc etc.

    But device drivers, especially printer drivers were the front lines of the war between MS-Word and WordPerfect in 1990s. WordPerfect created a virtual printer to which its software will print. They laboriously wrote printer drivers for every printer maker in existence at that time. In those days no matter how obscure and unknown your printer is, WordPerfect will be able to correctly print in it. It also got the "exactly the same printout, no matter what the printer is" edge over Microsoft.

    One way MS decided to create Windows printer driver standard and strong armed all the printer makers to supply a driver that will meet the windows spec. Apple Laserwriter and most other unixy printers had settled on postscript. It wanted to mess them up too. So it was all serious market share battleground those days. Forcing a proprietary ill-defined ever changing driver spec was MS way to deny the competitive advantage WP had built laboriously.

    But it also created two serious side effects on MS-Word. They comingled the virtual device driver code into MS-Word and tried to get the WYSIWYG cheap way. That is why MS-Word margins would change, pagination would change and page references would change if you change your default printer. It was a nightmare those days. Grad students who were PhDs in Engineering went completely bonkers trying to get a paper correctly printed in MS-Word, and worse the TeX guys were laughing at them.

    The second effect was hard pressed printer makers hacked out really bad printer drivers. Many of them took some approximate driver from some place and hacked out something that barely worked and passed basic acceptance test. Then bug reports would pour in, they will fix some of them, then post updated drivers... the mess has not been fully sorted out even now.

    The damage Microsoft did by deliberately sabotaging inter-operability is incalculable.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  14. Kluge rhymes with huge; kludge rhymes with sludge by Geoffrey.landis · · Score: 5, Informative

    Or, as some people spell the word, a kludge.

    Also known as literate people.

    So, some random site decided to grab the URL of "oxford dictionaries", I assume to mislead people into thinking that this is the Oxford English Dictionary

    Don't slashdotters know about the Jargon File anymore? (here or here or here.) It's sad how classic hacker history is so quickly forgotten.

    http://www.catb.org/jargon/htm... : kludge

      1. /kluhj/ n. Incorrect (though regrettably common) spelling of kluge (US). These two words have been confused in American usage since the early 1960s, and widely confounded in Great Britain since the end of World War II.

    In English, the soft "g" is pronounced as if it has a "d" in front of it. Kluge rhymes with huge. Kludge, on the other hand, would rhyme with sludge or judge.

    --
    http://www.geoffreylandis.com