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

Buffering Technique to Minimize Boundary Processing

IP.com Disclosure Number: IPCOM000115231D
Original Publication Date: 1995-Apr-01
Included in the Prior Art Database: 2005-Mar-30
Document File: 4 page(s) / 89K

Publishing Venue

IBM

Related People

Lemke, JW: AUTHOR

Abstract

A technique for minimizing the program overhead of both checking for buffer boundaries and handling special conditions at buffer boundaries is described.

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

Buffering Technique to Minimize Boundary Processing

      A technique for minimizing the program overhead of both
checking for buffer boundaries and handling special conditions at
buffer boundaries is described.

      When processing variable length items in a buffer, the end of
the buffer may be encountered when processing any portion of a data
item.  Therefore, all program sections that access the buffer must
check for the boundary and provide suitable special-case handling.

      The present technique  guarantees that a specified length of
data (ACCESS_LIMIT) can be processed as a unit without intermediate
checks for the buffer boundary.  If it is known that all data items
are shorter than ACCESS_LIMIT, the program does not need any explicit
checks or handling.  If not all items are shorter than ACCESS_LIMIT,
the program requires fewer explicit checks than before and no
special-case handling.

The following control information is maintained for each buffer
allocated:
  o  REFRESH_SIZE (length of a refresh or I/O operation)
  o  ACCESS_LIMIT
  o  address of a refresh routine
  o  a begin-data position
  o  an end-data position

The following logical steps are defined for reading and writing data
items:
  Allocate    Allocate REFRESH_SIZE + ACCESS_LIMIT bytes of memory
for
               the buffer.  Begin-data and end-data positions are set
to
               indicate that no data is present.
  AccessRead  The control information is used to calculate how much
               data is present in the buffer.  If there are fewer
than
               ACCESS_LIMIT bytes of unreferenced data, that data is
               moved to the beginning of the buffer, a refresh (read)
is
               performed and the control information is updated.  The
               begin-data position can now be used to get a data
item.
  AccessWrite The control information is used to calculate how much
               usused space is available in the buffer.  If there are
               fewer than ACCESS_LIMIT bytes of available space, a
            ...