by Dinesh Thakur Category: Memory

Understanding RAM on a PC gets pretty complicated, especially if you're using DOS instead of Windows. If your system is working okay already, don't bother with this information because it's pretty technical. But if you're running out of memory-if certain programs won't run or you can't create large files-you need some background knowledge before you march down and buy more memory. You may already have enough!

If you are running out of memory on a pc, you may have too many memory resident programs (TSRS) loaded. Unload the ones you don't absolutely need, or "load them high." Otherwise, your computer may not be able to get to the memory you do have. Be sure you run the right "extended memory manager" or "expanded memory manager" (later in this definition). If you are working in Windows on a pc, you may have too many applications open-close something.

Here's the scoop: You can think of your computer's memory as a series of mailboxes, each containing a single scrap of information. Mailboxes have addresses, and so does each location in memory. This concept is important because the address of a given memory location determines what your computer can do with it. In DOS pcs, memory is divided into four regions based on address, and two of the four overlap. I warned you this was going to be technical:

Conventional memory, the first 640K of RAM .

Upper memory, the memory between the 640K and l024K (1 megabyte)

HMA memory, the 64K of memory starting at l024K

Extended memory, everything above l024K (including HMA)

In addition, there's a fifth type of memory that can't be pinned down to a specific region. Expanded memory is actually located at addresses outside the first l024K, but your computer thinks it is inside that first megabyte.

Conventional memory: the first 640K of memory addresses is where the PC ordinarily keeps DOS itself and the programs and files you're actively working with. Because large programs and files won't fit, the last address in conventional memory is known as the "640K barrier."

Upper memory: the region between 640K and l024K, contains memory addresses set aside for the system's own use, including the information representing what you see on the screen and the instructions in the ROM BIOS chips that tell the machine how to operate. However, every PC has lots of unused addresses in upper memory. With the DOS commands DEVICEHIGH and LOADHIGH you may be able to rig things to make the upper memory addresses available for your TSRs and device drivers, freeing up space in conventional memory for larger programs and files (see your DOS manual).

Extended memory: which begins at 1024K,is found only on PCs with 80286 or newer microprocessors. Although the typical PC now comes with 2 megabytes of RAM, DOS still can't use extended memory except the first 64 KHMA (see below) memories. But some programs do. These programs have the ability to suspend DOS and switch the microprocessor into another mode that recognizes extended memory. This is how Windows works, and this technique is also used by programs like Lotus 1-2-3Release 3, and Paradox. The key is that unless you have a program that knows how to use extended memory, it won't help at all to buy more, and adding more extended memory will only benefit that particular program. HMA memory, the first 64K of extended memory, can be used as conventional memory by DOS and some programs (HMA stands for High Memory Area). To make this memory available, you must run a special piece of software called HIMEM.SYS that comes with DOS and Windows, or another "extended memory manager." Even then, a program can only use the HMA if is specifically developed to do so. If you have DOS5 or DOS6, the best way to use HMA is for DOS itself with the DOS=HIGH command.

Expanded memory: or EMS, was developed as a way to get around the 640Kbarrier in the old days, when PCs with 8088 processors were common and extended memory wasn't available. It works by setting aside a section of upper memory which becomes a sort of "window" through which your programs can access all the expanded memory in your computer. When a program wants to store information that doesn't fit in conventional memory, it sends the data to an address in this expanded memory window. Special software, an "expanded memory manager," steps in, copying the information into an area of expanded memory. When that part of expanded memory fills up, the memory manager "moves the window" to a different area of expanded memory. Your software keeps sending information to the window's address, while the memory manager makes sure that the information goes to an unused spot in expanded memory.

The only reason to use expanded memory is if you have a program that requires it-extended memory is faster and easier to work with. Some applications use expanded memory to store large files. Some TSRs can load themselves into expanded memory, which saves space in conventional and upper memory. Expanded memory isn't built into pcs, so if you want it, you have to add it:

If your PC has an 8088 or 80286 processor, you add expanded memory to your system on a board. If you have an 80386 or newer processor, you can run a special kind of expanded memory manager to convert extended memory into expanded (DOS and Windows come with one called EMM386.EXE). If you run Windows in 386 Enhanced mode, you don't need to do anything, because Windows automatically supplies expanded memory to any application that wants it, even a DOS one.

If you liked this article, you can also catch us on facebook and Google+

Related Articles (You May Also Like)

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Related Articles