Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Method for Sharing Data Amond Parent/Child Software Programs

IP.com Disclosure Number: IPCOM000106277D
Original Publication Date: 1993-Oct-01
Included in the Prior Art Database: 2005-Mar-20
Document File: 2 page(s) / 99K

Publishing Venue

IBM

Related People

Cameron, DD: AUTHOR [+2]

Abstract

Disclosed is a method for sharing memory among parent/child programs. This sharing methodology can be used by programs running in a DOS environment and provides a generalized method of program-to-program communication.

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

Method for Sharing Data Amond Parent/Child Software Programs

      Disclosed is a method for sharing memory among parent/child
programs.  This sharing methodology can be used by programs running
in a DOS environment and provides a generalized method of
program-to-program communication.

      In many programming environments, it is common for one program
(a "parent" program) to start a second program (a "child" program)
through a process commonly known as "shelling".  When program A
shells to program B, program A stays resident (but inactive) in
memory while program B executes.  When program B completes execution,
it terminates, memory allocated during its execution is freed, and
control returns to program A.  While this is a common method of
transfering control among programs, it is nonetheless difficult to
pass data between any two such programs.  Two workable methods of
passing data are:

o   Pass data as a command line argument:  This is a fast method of
    data transfer but is limited to 132 bytes minus the length of the
    child program name.  Furthermore transfer is unidirectional; data
    may only be passed from the parent to the child.
o   Use file sharing:  In this method, the programs share a common
    disk file and although this method puts no limit on the size of
    the data, it is characterized by very slow data transfer rates.

      This disclosure describes a method of sharing arbitrarily large
blocks of data among parent and child programs even when multiple
child programs or multiple generations of programs are involved.  The
method is extremely fast, bi-directional, not limited by data block
size, and is in no way hardware dependant.

The solution to this problem involves the following steps:

o   The parent program allocates a block of memory which will be used
    as the data interchange space.  Since this block of memory is
    within the parent program, the allocation can be as simple as an
    array declaration.

o   The parent program then shells to the child program, passing the
    address of this block of memory to the child program as a command
    line argument.  The size of the memory area and a flag indicating
    whether the child process is to read from or write to this memory
    block may also be passed as command line arguments.

o   At this point the child process begins execution and can now use
    this block of the parent program's memory space as if it were its
    own.  It can either read or write the memory block and can either
    pass the address on to a third program or else terminate...