The Full Wiki

More info on Upper memory blocks

Upper memory blocks: Wikis

Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.


(Redirected to Upper memory area article)

From Wikipedia, the free encyclopedia

The upper memory area is located between 640 KiB and 1024 KiB.

In computing, upper memory area (UMA) refers to memory between the addresses of 640 KiB and 1024 KiB (A0000h–FFFFFh) in an IBM PC or compatible. IBM reserved the uppermost region of the PC memory map, 1024 KiB being the maximum addressable limit of the original PC's 8088 CPU, for ROM, RAM on peripherals and memory-mapped input/output. For example, the monochrome video memory area runs from 704 to 736 KiB (B0000h–B7FFFh).

However, even with video RAM, the ROM BIOS and I/O ports for expansion cards, much of this 384 KB of address space was unused and as the 640 KiB memory restriction grew tighter, techniques were found to fill the empty areas with RAM. These areas were referred to as upper memory blocks (UMBs).




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 of DR-DOS 5.0 in 1990. DR-DOS' built-in memory manager, EMM386.EXE, could perform most of the basic functionality of QEMM 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 and AUTOEXEC.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.


This functionality was copied by Microsoft with the release of MS-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 called Memmaker 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.


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 of Windows 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, would not work as this was not allowed in the virtual 8086 mode it was running in. This point is now being addressed by x86 virtualization technologies such as Intel VT (Vanderpool) and AMD-V (Pacifica). Also, programs that tried making the switch using the VCPI 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 the DOS Protected Mode Interface API for switching to protected mode was supported.


Virtual x86 Mode

Upper memory blocks can be created by mapping extended memory into the upper memory area when running in virtual x86 mode. This is similar to how expanded memory can be emulated using extended memory so this method of providing upper memory blocks is usually provided by the expanded memory manager (for example EMM386). Ironically the application programming interface for managing the upper memory blocks is specified in the eXtended Memory Specification.

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, such as UMBPCI.


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 [1]. As with the 386-based upper memory described above, the extra RAM could be used to load TSR files, or as a RAM disk.

The AllCard, an add-on memory management unit for XT-class computers, allowed normal memory to be mapped into the A0000-EFFFF (hex) address range, giving up to 952 kB for DOS programs. Programs such as Lotus 1-2-3, which accessed video memory directly, needed to be patched to handle this memory layout. Therefore, the 640 kB barrier was removed at the cost of hardware compatibility. This usage of the Upper Memory Area is different from using Upper Memory Blocks, as this extended conventional memory into the upper 384kB of the 1MB address space.

See also

Got something to say? Make a comment.
Your name
Your email address