Memory Management

Memory management is the way in which the operating system allows applications to access the system's memory. This includes the way in which memory is allocated, either to a single application or to be shared by multiple applications. The operating system must check how much memory is available to an application, and handle the situation where there is no longer any real memory left to satisfy an application's requests.

In OS/2 Version 2.0, memory management has been enhanced to provide a flat memory model, which takes advantage of the 32-bit addressing scheme provided by the Intel 80386 architecture. This means that through memory management, the system's memory is seen as one large linear address space of 4GB. Applications have access to memory by requesting the allocation of memory objects. Under OS/2 Version 2.0, these memory objects can be of any size between 1 byte and 512MB. The use of a flat memory model removes the need for application developers to directly manipulate segments, and thereby removes a significant obstacle in porting applications between OS/2 Version 2.0 and other 32-bit environments such as AIX*. Application performance is also improved when manipulating memory, since the use of a linear address space eliminates pointer arithmetic and segment register loads.

OS/2 Version 2.0 manages memory internally using pages, each of which is 4KB in size. Each memory object is regarded by the operating system as a set of one or more pages. For practical purposes therefore, memory is allocated in units of 4KB, although a page may be broken down into smaller parts and may contain multiple memory objects.

One of the useful aspects of paged memory is the way in which memory overcommitment is handled, that is, what happens when there is no more real memory left to load applications. Under OS/2 Version 2.0, individual pages may be swapped to and from disk, rather than entire memory objects. This technique improves swapping performance, particularly when large memory objects exist in the system. The fixed page size also improves swapping performance since the operating system need not be concerned with moving objects in memory to accommodate the various object sizes, as was the case with previous versions of OS/2.

Memory management under OS/2 Version 2.0 is described in more detail in Memory Management.


[Back: Intel 80386 32-Bit Microprocessor Support]
[Next: Task Management]