Why didn’t Windows 95 suck the brains out of the XMS driver?


In the discussion of the MS-DOS game that required 32 XMS handles, it was suggested that a solution to the problem of figuring out which handles could be used as local handles without conflicting with existing global handles was to suck the brains out of the XMS driver, and thereby have full information about all the outstanding handles. From there, Windows 95 could create new handles that were guaranteed not to conflict with existing handles.

Windows 95 used Windows 3.1 as its starting point, and the way Windows 95 took over from the MS-DOS XMS driver matches the way Windows 3.1 did it. Windows 3.1 had to be able to coexist with third party XMS drivers, so it took a conservative approach. There was in fact a "brain dump" interface for sucking the brains out of the real-mode driver, and if the MS-DOS XMS driver supported it, Windows 3.1 used the "brain dump" interface as a shortcut to the "allocate all the remaining XMS handles" loop. On the other hand, it didn't go the extra mile and use this information to manufacture new local XMS handles because there was no scenario that required it.¹

There were no major applications that would have taken advantage of having a larger set of local XMS handles, probably because the XMS specification itself cautioned programs that the number of XMS handles is limited and programs should use a small number of large XMS blocks instead of a large number of small XMS blocks. Programs which followed the recommendation of the XMS specification would not have benefited from a large number of local XMS handles, which meant that there was little demand for a large number of local XMS handles.

Furthermore, all of the Windows 3.1 protected-mode kernel was written in assembly language, so there was a natural reluctance to go in and make large changes of marginal benefit. I was responsible for the Windows 95 XMS driver, and there were things in that driver that really needed to be done, but adding support for more local XMS handles was not one of them.

That's why Windows 95 didn't try to be awesome about local XMS handles. So far, in all of the application compatibility investigations, only one application would have benefited from it, and there was already a workaround that people were comfortable with: Run the game in MS-DOS mode.

¹On the other hand, Windows 3.1 happily took advantage of the brain dump interface for the expanded memory driver because a lot of important programs used expanded memory and would take advantage of more such memory if it were available. Adding more expanded memory was such a big deal that people actually spent real money buying expansion cards whose sole purpose was to add more expanded memory to your PC.

Comments (19)
  1. Medinoc says:

    “extended memory” vs “expanded memory”? Ugh, this terminology sounds like a great source of errors.

    1. yukkuri says:

      All of us that had to deal with it quickly memorized which was which. :p

      1. Yep. Yep. Those days with all those HIMEM.SYS, EMM386.SYS, UMB and MEMMAKER were quite hectic. Lots of words for a lot of nothing.

        MEMMAKER sucked…

        1. cheong00 says:

          Yup, requires multiple reboot to check which setting gives more conventional memory.

          Then again, those programs / drivers does not announce now much conventional memory they still need when loading high, and whether they’ll hang when you try to load them there. The only way to find out is to actually try to load them in HMA/UMB.

      2. smf says:

        The best thing about those days is that the people with a clue had computers that worked better than the people without. It was quite easy to evaluate whether someone knew anything about computers or not. Making it easier for everyone to setup a computer has made it harder. I always cringe when someone says that they are going to build their own computer, when they mean they are going to assemble it from parts. I assume cabinet makers feel the same way about people who are proud to assemble a monstrosity from IKEA and proclaim that they built it.

    2. John Elliott says:

      At least the acronyms are different. IBM made two graphics standards and abbreviated both to XGA: the eXtended Graphics Array and the eXpanded Graphics Adapter. There is no way this could cause the slightest confusion.

    3. xp.client says:

      For the average Joe, it was fun to get familiar with this without access to the web and playing with the startup files to create all possible combinations to optimize his various DOS programs: load or skip loading in HMA, UMB, load or skip EMM386, and other dozen drivers – MSCDEX, PS/2 and serial mice, Sound Blaster compatible sound with right IRQs and DMA channels, ASPI driver as needed. Manual tweaking almost always gave better results than memmaker.

      1. Neil says:

        Particularly as neither MEMMAKER nor QEMM’s optimiser (I forget its name) included environment blocks in their calculations, they would over-estimate how much they could load into a particular UMB.

        1. Joshua says:

          If your environment block is > 128 bytes that early on you’re doing it wrong.

      2. Scarlet Manuka says:

        Oh, yeah, those were (not) the days.
        I had five different startup configurations defined, and that was before you got into the question of whether or not to load the mouse driver, or what mode the sound card should be put in (because those things could be done later and didn’t need support in config.sys). Switching from one game to another quite often meant you had to reboot in between to get the right config.

    4. Azarien says:

      XMS vs EMS is easier and you don’t have to know which is “extended” and which is “expanded”.

  2. Yuhong Bao says:

    Can the Global EMM Import spec be posted publicly?

    1. yukkuri says:

      No… Whatever you are thinking of doing with it, just no. Use something befitting 2016 instead :D

      1. xcomcmdr says:

        It might be because of emulation needs.
        Emulators like DOSBox will always have room for improvement.
        Or for the sake of curiosity.

        1. yukkuri says:

          Well that is a good point…

  3. Damien says:

    I remember seeing an earlier expansion card – adding to the *base* memory of an early PC. A full-length card which sported a whopping (IIRC) 256K of memory.

    1. Rick C says:

      I had one of those–it was really nice at the time.

    2. Neil says:

      I remember installing QRAM on a ‘286 to turn its expanded memory into upper memory.

  4. tremors08 says:

    It’s amazing how much I am still learning about the first computer I ever had that ran windows 95. Also Raymond will you be opening another suggestion box at any point? I wanted to put in a suggestion but can’t seem to find any place to put one. Thank you.

Comments are closed.

Skip to main content