Quarterdeck Expanded Memory Manager (abbreviated QEMM, sometimes pronounced /ˈkwɛm/, though not by those who developed it), was a memory manager produced by Quarterdeck Office Systems in the late 1980s through late 1990s. It was the most popular memory manager for the MS-DOS and other DOS operating systems.
Product
Originally, the product was called QEMM-386, and had a complementary product called QRAM that worked in a similar manner on Intel 80286's that had some specific Chips and Technologies chipsets. The 386 was dropped when the Intel Pentium was released. QEMM-386 and DESQview could cooperate and when shipped as a bundle were called DESQview 386.
QEMM provides access to the Upper Memory Area (UMA), expanded memory (EMS) and extended memory (XMS). DOS programs frequently required a large amount of conventional memory, and QEMM helped to increase the amount of free conventional memory by loading programs into UMBs and the High Memory Area, the first 64K (minus 16 bytes) of physical extended memory. A number of programs, such as Lotus 1-2-3, early versions of Microsoft Windows, and many games also used the EMS and XMS memory.
QEMM supports both the Virtual Control Program Interface and DOS Protected Mode Interface methods by which applications can make use of expanded memory.
DOS equivalents
Microsoft released comparable but simpler memory managers of its own - HIMEM.SYS for XMS and EMM386.EXE for EMS with MS-DOS 4.01 in 1989; earlier Windows/386 2.1 included a built-in EMM which offered EMS to DOS windows during Windows sessions only. These versions could not yet create Upper Memory Blocks. Digital Research's DR-DOS 5.0 (1990) was the first non-vendor-specific DOS to offer the UMB technology, incorporating a 386-mode XMS/EMS manager also called EMM386. MS-DOS finally offered UMBs in 1991 with version 5.0. MS-DOS's EMM386 required HIMEM to be loaded first, while DR-DOS's EMM386 fulfilled both roles and did not need a separate XMS driver, which was still provided but only needed on 80286-based machines (HIDOS.SYS).
Neither DR's nor MS's memory managers were as capable as QEMM - for example, both required Upper Memory Blocks to be manually discovered and included, whereas QEMM could do this quite satisfactorily on its own. QEMM also did not require one to predefine how much memory should become EMS and how much should be XMS, therefore it was not necessary to juggle boot configurations, a facility subsequently incorporated into EMM386 for later versions of MS-DOS. However, although QEMM still usually freed up more conventional memory than EMM386 did, Microsoft finally automated the process of UMB optimisation in DOS 6 with the memmaker utility, and QEMM's market share began to slide.
Windows transition / Decline of QEMM
While popular when DOS programs were the mainstream, QEMM eventually became largely irrelevant as Windows programs replaced DOS programs for most users, many of whom were newcomers with no prior DOS experience, while some of those more experienced switched to operating systems with which QEMM is (and always was) incompatible, most notably the Windows NT series and Linux. The final version was QEMM 97, which was compatible with Windows 95 and later Windows 98/ME, but by this point, not only was DOS memory management no longer in high demand, but the remaining competitive DOS applications (notably DOS ports of Unix applications such as various GNU utilities, VIM, etc.) were (and are), fully capable 32-bit protected mode applications with negligible needs for conventional memory, and thus even more negligible needs for QEMM; the greatly increasing RAM sizes at low cost suit such applications well, and also render the MagnaRAM (RAM compression) component of QEMM useless. Finally, modern PCI chipsets provide well documented functionality to enable access(*) to Upper Memory Blocks that are managed as normal conventional memory by DOS (with a little help from HIMEM.SYS) (see UMBPCI for what may be the best available example); in many or most cases, this last fact eliminates the need for QEMM for even those relatively few users who use DOS applications and who might otherwise find QEMM essential. (* by removing chipset-level write protection from unused Shadow RAM and simply informing DOS of the existence of that memory.)
When Windows 3.0 (or later) is starting in "386 Enhanced" mode (the only mode available in 3.11/95/98/Me versions of Windows), it sends a query (at the same serving as an announcement) called a "callout" (using an INT 2F interface) giving any already loaded software the opportunity to prepare for operation in protected mode, to specify any additional Windows-specific program modules to be loaded, to return a list of memory addresses that need to be copied ("instanced") for uniqueness at the time of task switches, or even in some cases to issue an error message about incompatibility with Windows and halt the machine. One important aspect of the startup sequence is to transfer important information from existing memory managers about memory page mappings that may have been established prior to loading Windows; this is known as the "Global EMM import" interface (see DDJ and other sources for details). Also, from QEMM or other software that runs the processor in V86 mode Windows needs to be given a function that it can call in order to switch to protected mode (and later, possibly, back to real mode). Upon the switch to protected mode, the previous memory manager may simply become inactive and wait for a possible return to real mode when Windows shuts down, but other memory managers such as late versions of QEMM or 386MAX take a more active role and load one or more so-called VxDs (Virtual Device Drivers) which are loadable kernel modules (as they would be called in a Linux or Unix context) analogous to DOS installable device drivers (but for a 32-bit protected mode rather than real mode environment). Many VxD are, as the name suggests, device drivers that support various hardware, but for QEMM VxDs, the task is to take over or modify certain memory management (e.g. Stealth RAM) operations from Windows default handlers, and to take necessary steps to maintain compatibility with features that QEMM has established previously (before Windows is launched). Some versions of QEMM include VxDs to provide the additional feature of RAM compression (see MagnaRAM), which is available only during a Windows session and not in the plain DOS-only environment.
Sources: (random order) Ralf Brown's Interrupt List (see http://www.cs.cmu.edu/~ralf/); Unauthorized Windows 95 (Andrew Schulman), 1st Ed.; Doctor Dobb's Journal, Undocumented Corner section in particular; Intel PCIset and Processor manuals; source code and binaries of HIMEM, EMM386, DOS, UMBPCI and others; QEMM documentation; other sources probably exist as well.
See also
External links