Browse Prior Art Database

Multi-Process Management Facility

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

Publishing Venue

IBM

Related People

Calo, SB: AUTHOR [+2]

Abstract

Disclosed is an algorithm which allows processes which share memory, to communicate by placing messages in a buffer. The messages may then be read by other processes.

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

Multi-Process Management Facility

      Disclosed is an algorithm which allows processes which share
memory, to communicate by placing messages in a buffer.  The messages
may then be read by other processes.

      Consider a fixed sized in memory buffer BUF, with an alternate
buffer ALTBUF.  More generally, there may be a queue on n buffers,
and an alternate queue of m<n alternate buffers.  As long as BUF is
not full, a writer may place a message in BUF.  If there are messages
that have not been read, a reader may read a message from BUF.
Associated with BUF are, a beginning of buffer pointer, BOB, an end
of buffer pointer, EOB, an access semaphore, a next message to be
read pointer, RDPTR, a write pointer, WTPTR, and an alternate buffer
indicator.

      A write operation must proceed as an atomic action.  To write a
message to BUF, a writer attempts to advance the WTPTR by the number
of bytes needed for the message.  The message is then stored into the
buffer.  These two actions should be atomic actions to other
processes.  This operation will work so long as there are enough
bytes between WTPTR and EOB to store the message.  If there are not
enough bytes to store the message, the following approach is taken:

1.  The writer checks whether RDPTR is equal to WTPTR.  (Equality
    means that all messages have been read.)  If the two pointers are
    equal, the writer then checks the access semaphore.  If the
    access semaphore is zero, no process is accessing any of the
    messages in the buffer.  The writer may then reuse the buffer.
    The two checks, and buffer reuse must proceed as an atomic
    action.  To reuse the buffer, the writer atomically,
    a.  sets RDPTR equal to BOB.
    b.  copies the message into the buffer.
    c.  advances WTPTR to the first available byte past the new
        message.
2.  If the test for buffer reuse fails, the writer must switch to an
    alternate buffer.  Buffer switching involves the following steps,
    which must be preformed atomically with the test for buffer
    reuse.
    a.  The writer obtains a buffer, ALTBUF from the alternate buffer
        queue.
    b.  The writer sets the alternate buffer indicator of BUF by
        storing the location of ALTBUF's, BOB poi...