- Upper Memory Area
The Upper Memory Area (UMA) is a design feature of
IBM PC-compatiblex86 computer s that was responsible for the 640 KB barrier.Reserved memory space
IBM reserved the uppermost region of the PC memory map for ROM,
RAM onperipheral s and memory-mapped input/output (I/O , also MMIO). This region is called the UMA and lies aboveconventional memory , between 640 KBTransistorized memory such as RAM and Cache size is specified using binary meanings for K (10241 instead of 10001), M (10242 instead of 10002), G (10243 instead of 10003), ... ] and 1 MB maximum addressable limit of the original PC's 8088 CPU. For example, the monochrome video memory area runs from 0xB000 to 0xB7FF. However, even with video RAM, the ROMBIOS and I/O ports for expansion cards, much of this 384 KB of address space was unused - even when a 64 KB window was reserved for theexpanded memory "frame" address into which EMS RAM was bank-switched.Usage in DR-DOS
The next stage in the evolution of DOS was for the OS itself to become aware of Upper Memory Blocks (UMBs) and the
High Memory Area . This occurred with the release ofDR-DOS 5.0 in 1990. DR-DOS' built-in memory manager,EMM386.EXE , could perform most of the basic functionality ofQEMM and comparable programs.Where DR-DOS scored over the combination of an older DOS plus QEMM was that the DR-DOS kernel itself and almost all of its data structures could be loaded into high memory, plus all of its associated components into UMBs. This left virtually "all" the base memory free, allowing configurations with up to 620 KB out of 640 KB free.
Configuration was not automatic - free UMBs had to be identified by hand, manually included in the line that loaded EMM386 from CONFIG.SYS, and then drivers and so on had to be manually loaded into UMBs from
CONFIG.SYS andAUTOEXEC.BAT . This configuration was not a trivial process. As it was largely automated by the installation program of QEMM, this program survived on the market; indeed, it worked well with DR-DOS' own HMA and UMB support and went on to be one of the best-selling utilities for the PC.Usage in MS-DOS
This functionality was copied by
Microsoft with the release ofMS-DOS 5.0 in June 1991. Eventually, even more DOS data structures were moved out of conventional memory, allowing up to 631 KB out of 640 KB to be left free. Starting from version 6.0 of MS-DOS, Microsoft even included a program calledMemmaker which was used to automatically optimize conventional memory by moving TSR programs to the upper memory.For a period in the early 1990s, manual optimisation of the DOS memory map became a highly-prized skill, allowing for the largest applications to run on even the most complex PC configurations. The technique was to first create as many UMBs as possible, including remapping allocated but unnecessary blocks of memory, such as the monochrome display area on colour machines. Then, DOS' many subcomponents had to be loaded into these UMBs in just the correct sequence, as to use the blocks of memory as efficiently as possible, allowing for the fact that some TSR programs required additional memory while loading, which was freed up again once loading was complete. Fortunately there were few dependencies amongst these modules, so it was possible to load them in almost any sequence. Exceptions were that to successfully cache CD-ROMs, most disk caches had to be loaded after any CD-ROM drivers, and that the modules of most network stacks had to be loaded in a certain sequence, essentially working progressively up through the layers of the
OSI model .A basic yet effective method used to optimize conventional memory was to load HIMEM.SYS as a device, thereafter loading EMM386.EXE as a device with the "RAM AUTO" option which allows access into the UMA by loading device drivers as devicehigh. This method effectively loads the fundamental memory managers into conventional memory, and thereafter everything else into the UMA. Conventional memory glutton programs such as MSCDEX could also be loaded into the UMA in a similar fashion, hence freeing up a large amount of conventional memory.
Usage with multitasking
With the addition of a DOS multitasker such as Quarterdeck's
DESQview , multiple sessions could be started at once, each with 600-odd K of free memory and all sharing access to DOS and its associated drivers and facilities.Usage in Windows
The increasing popularity of
Windows 3.0 made the necessity of the Upper Memory Area less relevant, as Windows applications were not affected by DOS' base memory limits, but DOS programs running under Windows (with Windows itself acting as a multitasking manager) were still thus constrained. With the release ofWindows 95 , it became less relevant still, as this version of Windows provides much of the functionality of the DOS device drivers to DOS applications running under Windows, such as CD, network and sound support; the memory map of Win95 DOS boxes was automatically optimised. However, not all DOS programs could execute in this environment. Specifically, programs that tried to directly switch from real mode to protected mode, wouldn't work as this wasn't allowed in the virtual 8086 mode it was running in (actually, this point is now being addressed by upcomingvirtualization technologies such asVanderpool and Pacifica for the x86 CPUs). Also, programs that tried making the switch usingVCPI API (which was introduced to allow DOS programs that needed protected mode to enter it from the virtual 8086 mode set up by a memory manager, as described above) didn't work in Windows 95. Only theDOS Protected Mode Interface API for switching to protected mode was supported.Upper Memory and shadow RAM
On many systems including modern ones it is possible to use memory reserved for shadowing expansion card ROM as upper memory. Many chipsets reserve up to 384 KB RAM for this purpose and since this RAM is generally unused it may be used as
real mode upper memory with a custom device driver.Upper Memory on the IBM XT
On
IBM XT computers, it was possible to add more memory to the motherboard and use a custom address decoder PROM to make it appear in the upper memory area [http://www.textfiles.com/computers/pc869kb.txt] . As with the 386-based upper memory described above, the extra RAM could be used to load TSR files, or as aRAM disk .Notes
ee also
*
Conventional memory
*Extended memory (XMS)
*Expanded memory (EMS)
*High Memory Area (HMA)
Wikimedia Foundation. 2010.