Browse Prior Art Database

Buffer Pools: Sharing a Common Resource with Guarantees

IP.com Disclosure Number: IPCOM000113057D
Original Publication Date: 1994-Jul-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 4 page(s) / 90K

Publishing Venue

IBM

Related People

Byrn, JW: AUTHOR [+3]

Abstract

Disclosed is a concurrent hardware method of sharing memory buffers in such a way that the memory utilization is maximized, the total memory requirement is minimized, and the possibility of one user overrunning all of the others is eliminated.

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

Buffer Pools: Sharing a Common Resource with Guarantees

      Disclosed is a concurrent hardware method of sharing memory
buffers in such a way that the memory utilization is maximized, the
total memory requirement is minimized, and the possibility of one
user overrunning all of the others is eliminated.

      Efficient resource sharing means that less of the resource that
is being shared is needed (than with inefficient sharing).
Statistically, multiplexing the use of a resource lets the various
users of that resource take advantages of the drift in requirements
from user to user over time.  Users sharing a multiplexed resource
often have minimal requirements that must be satisfied.  A
combination of resource sharing for marginal efficiency improvement
and guaranteed resources for guaranteed operation can be considered
the ideal in a statistically multiplexed environment.

      It is appropriate here to look at the memory management
philosophy.  It is important to guarantee buffer users some amount of
storage.  However, it is also useful to let some amount of storage
float to where it is needed to help maintain peek operating
performance.  This is done through the concept of a pool.

void *get_buffer(int pool_index) {
   /* the counts used are retrieved from the arrays using the pool
ind         ex */
          if (active buffer count < guaranteed count) {
               increment active buffer count;
               return next buffer from fifo;
          }
          else if ((active buffer count <= common count) AND
                   (total common count > 0)) {
              increment the active buffer count;
              decrement the total common count;
              return next buffer from fifo;
          }
          else {
              return a zero pointer;
          }
       }
       void free_buffer(void *buffer, int pool_index) {
           return the buffer to the tail of the fifo;
    /* the counts used are retrieved from the arrays using the pool
ind        ex */
          if (active buffer count >= guaranteed count) {
              increment the total common count;
          }
          decrement the active buffer count;
       }

Fig. 2.  Pool buffer algorithms

      A pool is a mechanism for allocating buffers.  Since all
buffers are the same to all pools, a simple count can be used to
manage the pool rather than managing individual buffers or pieces of
buffers.  Since a count is being used, thresholds can be used to
guarantee b...