SYSTEM MEMORY MANAGEMENT
When the original PC was designed, there were certain decisions made in dividing up the 8088 system’s one megabyte of memory address space. These decisions were implemented by the original PC-DOS and MS-DOS operating systems. Due to compatibility issues, these decisions have carried over into the address allocations of all PC-compatibles, as shown in the following figure.
MS-DOS can recognize the following classifications of memory:
Conventional memory
Upper memory blocks
High memory area
Expanded memory
Extended memory
Virtual memory
· Conventional Memory
Conventional memory (locations 00000h through 9FFFFh) is the standard memory area for all PC-compatible systems. It traditionally holds the operating system, interrupt vector tables, and relocated ROM BIOS tables. The remaining space in the conventional memory area is referred to as DOS Program Memory.
· Upper Memory Area
The upper memory area (UMA) occupies the 384KB portion of the PC's address space
from A0000h to FFFFFh. This space is not normally considered as a part of the computer's total address space because programs cannot store information in this
area. Instead, the area is reserved to run segments of the system's hardware.
Address spaces from A0000h through BFFFFh are dedicated addresses set-aside for
the system's video display memory. The system's ROM BIOS occupies the address
space between locations FE000h and FFFFFh.
Between the video memory and system BIOS areas, addresses are reserved to hold
BIOS extension programs for add-on hardware adapters. Typical BIOS extensions
include those for hard drive adapters, advanced video adapters, and network adapters.
After BIOS extensions are in place, the typical UMA still has many unused memory areas that can have information mapped (copied) into them. This space is segmented into 64KB sections called upper memory blocks (UMBs). The primary use for these blocks is to hold installable device drivers and other memory resident programs moved out of the conventional memory area. By moving these programs out of the conventional memory area, more space is made available there for use by application programs.
PCs also use this area to incorporate a memory-usage scheme called Shadow RAM to
improve their overall performance. With this feature, the content of the system BIOS
and/or adapter BIOS are rewritten (shadowed) into faster extended memory RAM
locations. The operating system then remaps ROM addresses to the corresponding
RAM locations through unused portions of the UMA. Shadowing enables the system to
operate faster when application software makes use of any of the BIOS' CALL
routines.
· Extended Memory
With the advent of newer microprocessors that employ protected operating mode, it
became possible to access physical memory locations beyond the 1-megabyte limit of
8088 system. Memory above this address is generally referred to as extended
memory. Modern operating systems can take full advantage of extended memory
through the Protected Addressing modes of the more advanced microprocessors. This
capability to manage higher memory enables the system to free more base memory
area for applications programs.
Flat Memory Models
Unlike MS-DOS, Windows 3.x, or Windows 9x, other operating systems, such as
Windows NT, Windows 2000, Windows XP, UNIX, and LINUX, do not employ address segmentation features of Intel microprocessors to divide the computer’s memory allocations. Because segments can overlap, memory usage errors can occur when an
application attempts to write data into a space being used by the operating system or
by another application.
Using the Flat Memory Model, the memory manager sections map each application’s
memory space into contiguous pages of physical memory. Using this method, each
application is mapped into a truly unique address space that cannot overlap any other
address space. The lack of segment overlap reduces the chances of applications
interfering with each other and helps to ensure data integrity by providing the
operating system and other processes with their own memory spaces.
The following figure shows the Flat Memory Model concept. In this example, the 32-
bit address produced by the microprocessor contains three parts dictated by the
operating system. The highest 10 bits of the address point to the Page Table
Directory.
This table sets the address boundaries for each page of memory in the
memory. This guarantees that there is only one method of entering the page space
through this table. Therefore, there is no chance for poorly written software to stray
into a page it has not been assigned. The lower 22 bits of the address are used to
access a particular page within the block of addresses specified in the Page Table
Directory (bits 12-21), and then to select a particular physical address within the
page (bits 0-11).
Next publication will focus on what a virtual memory is and how to configure it on MS-Windows Operating System.
Keep it up!
No comments:
Post a Comment