Saturday 24 November 2012

Extended memory (part 2)


Extended memory

Extended memory refers to memory above the first megabyte of address space in an IBM PC with an 80286 or later processor.
Extended memory is only available on PC's based on the Intel 80286 or higher processor. Only these chips can access more than 1MB of RAM. On a 286 or better PC equipped with more than 640KB of RAM, the additional memory would generally be re-mapped above the 1MB boundary, making all of it available to programs running in Protected mode. Even without such remapping, machines with more than 1MB of RAM would have access to memory above 1MB.
Extended memory is available in real mode only through EMS, UMB, XMS, or HMA; only applications executing in protected mode can use extended memory directly. In this case, the extended memory is provided by a supervising protected-mode operating system such as Microsoft Windows. The processor makes this memory available through the Global Descriptor Table and one or more Local Descriptor Tables (LDTs). The memory is "protected" in the sense that memory segments assigned a local descriptor cannot be accessed by another program because that program uses a different LDT, and memory segments assigned a global descriptor can have their access rights restricted, causing a hardware trap (typically a General Protection Fault) on violation. This prevents programs running in protected mode from interfering with each other's memory.
A protected-mode operating system such as Windows can also run real-mode programs and provide expanded memory to them. The DOS Protected Mode Interface is Microsoft's prescribed method for an MS-DOS program to access extended memory under a multitasking environment.

Expanded memory

Expanded Memory was a trick invented around 1984 that provided more memory to byte-hungry, business-oriented MS-DOS programs. These were typically spreadsheets and databases running on the original IBM PC, and on its successors like the IBM AT. Both machines used real mode memory architecture, which only allowed programs to use 1 megabyte of address space, of which only up to 640 KiB was reserved for use.
The idea behind expanded memory was to use part of the remaining 384 KiB, normally dedicated to communication with peripherals, for program memory as well. In order to fit potentially much more memory than the 384 KiB of free address space would allow, a banking scheme was devised, where only selected portions of the additional memory would be accessible at the same time. Originally, a single 64 KiB window of memory was possible; later this was made more flexible. Applications had to be written in a specific way in order to access expanded memory.
This insertion of a memory window into the peripheral address space could originally be accomplished only through specific expansion boards, plugged into the ISA expansion bus of the computer. Famous 1980's expanded memory boards were AST RAMpage, IBM PS/2 80286 Memory Expansion Option, AT&T Expanded Memory Adapter and the Intel Above Board. Given the price of RAM during the period, up to several hundred dollars per megabyte, and the quality and reputation of the above brand names, an expanded memory board was very expensive.
Later, some motherboards of Intel 80286-based computers implemented an expanded memory scheme that did not require add-on boards. Typically, software switches determined how much memory should be used as expanded memory and how much should be used as extended memory.
Beginning in 1987, the built-in memory management features of Intel 80386 processor freely modeled the address space when running legacy real mode software, making hardware solutions unnecessary. Expanded memory could be simulated only by the software.
A more efficient way to access address space beyond 640KiB on 80286 and later processors, was by using the DOS Protected Mode Interface (DPMI). DOS extenders were drivers that allowed applications to run in protected mode. Rather than trying to access more memory through banking tricks, the drivers switched the processor into protected mode when running the application program, and back to real mode when accessing MS-DOS services. This allowed programs to directly access all memory which was configured as extended memory.
The use of expanded memory by applications diminished through the early 1990s, as DOS extenders became more prevalent.

Details

An expanded memory board being a hardware peripheral, it needed a software device driver, which exported its services. Such a device driver was called "expanded memory manager". Its name was variable; the previously mentioned boards used remm.sys (AST), ps2emm.sys (IBM), aemm.sys (AT&T) and emm.sys (Intel) respectively. Later, the expression became associated with software-only solutions requiring the 80386 processor, for example Quarterdeck's QEMM (see below).
Expanded memory was a common term for several incompatible technology variants. The Expanded Memory Specification (EMS) was developed jointly by Lotus, Intel, and Microsoft, so this specification was sometimes referred to as "LIM EMS". EEMS, a competing expanded memory management standard, was developed by AST Research, Quadram and Ashton-Tate. It allowed to also remap some or all of the lower 640 kB of memory, so that entire programs could be switched in and out of the extra RAM. The two standards were eventually combined as LIM EMS 4.0.


                                                                                     ............... to be continued

No comments:

Post a Comment