Browse Prior Art Database

Operating System/2 Version 1.0 Dynamic Memory Allocation Algorithm for Multi-process Applications

IP.com Disclosure Number: IPCOM000107877D
Original Publication Date: 1992-Mar-01
Included in the Prior Art Database: 2005-Mar-22
Document File: 3 page(s) / 117K

Publishing Venue

IBM

Related People

Curry, SM: AUTHOR [+4]

Abstract

Disclosed is an Operating System/2* Version 1.0 dynamic memory allocation algorithm for multi-process applications. It addresses several of the problems posed when dynamically allocating memory in a 16-bit operating system for multi-process applications. The algorithm that follows provides for increased efficiency of memory usage, reduced fragmentation and total memory requirements, and is extensible to include other applications.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Operating System/2 Version 1.0 Dynamic Memory Allocation Algorithm for Multi-process Applications

       Disclosed is an Operating System/2* Version 1.0 dynamic
memory allocation algorithm for multi-process applications. It
addresses several of the problems posed when dynamically allocating
memory in a 16-bit operating system for multi-process applications.
The algorithm that follows provides for increased efficiency of
memory usage, reduced fragmentation and total memory requirements,
and is extensible to include other applications.

      With 16-bit Operating System/2 Version 1.0, dynamic memory
allocation poses a few problems.  Usually non-shared segments are
allocated of a predetermined size and the allocating process
suballocates pieces of these segments to serve its dynamic memory
resource requirements.  A process may allocate large segments and, at
any time during the execution of the process, leave substantial
portions of the segments unused.  A process can also allocate small
segments but then may be forced to resize segments when the need
arises.  Resizing is an expensive operation because it is relatively
slow.  The third problem is that suballocating and freeing pieces of
segments can cause the segments to become fragmented.  A single
application running on Operating System/2 Version 1.0 can have
multiple processes, thereby compounding these problems linearly.

      A solution to the described problems is to support the dynamic
memory resource requirements of all processes in a multi-process
application with shared memory segments.  A single set of memory
allocation routines are provided via a Dynamic Link Library (DLL).

      When the first process requests memory, a shared memory segment
is allocated.  The information necessary for other processes to
access this shared memory segment is stored in a table that also
resides in the DLL. The amount of the shared memory segment requested
by the process is suballocated to the process.

      When second and additional processes request memory for the
first time, they are given access to this shared memory segment and
suballocated the requested amount of memory.

      If a process requests more memory than is available in the
first shared memory segment, a second shared memory segment is
allocated and the information necessary for other processes to access
this new shared memory segment is stored in the table as well.
Additional shared memory segments are allocated in a similar manner
as necessary to satisfy the requests.  A request from a process for
an amount of memory is always attempted against the first shared
...