Browse Prior Art Database

Dynamic Data Stream Blocking Algorithm

IP.com Disclosure Number: IPCOM000118444D
Original Publication Date: 1997-Feb-01
Included in the Prior Art Database: 2005-Apr-01
Document File: 2 page(s) / 92K

Publishing Venue

IBM

Related People

Airola, JT: AUTHOR [+3]

Abstract

Disclosed is an algorithm which allows automatic adjustment of the size of data transfer buffers so as to increase the data transfer rate, decrease context switches, and reduce data starvation to the consumer of the data. The algorithm takes into account the current data reception and consumption rates and uses this information to determine the size of the buffer to allocate for the next transfer.

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

Dynamic Data Stream Blocking Algorithm

      Disclosed is an algorithm which allows automatic adjustment of
the size of data transfer buffers so as to increase the data transfer
rate, decrease context switches, and reduce data starvation to the
consumer of the data.  The algorithm takes into account the current
data reception and consumption rates and uses this information to
determine the size of the buffer to allocate for the next transfer.

      As the Figure shows, there are two main structures used by
the Dynamic Data Stream Blocking Algorithm:  The Buffer Space and the
Logical Buffer Queue.  Logical Buffers are allocated out of the
Buffer Space.  Each Logical Buffer holds one or more Blocks of data
received from the Data Producer.  The Blocks are specified to a
maximum size depending on the data transport mechanism being used.

      The Logical Buffer Queue holds the addresses of filled, Logical
Buffers.  When a Logical Buffer is filled, its address is enqueued.
The data in the Logical Buffers is not made available to the Data
Consumer until the associated queue element is dequeued by the Data
Consumer.

      The Logical Buffer Queue is the main control mechanism in the
Algorithm.  When the Data Consumer requires data it tries to dequeue
a Logical Buffer address.  If no elements are currently on the queue
the Consumer waits.  When the Data Producer sends enough data Blocks
to fill the current Logical Buffer, the Buffer's address is enqueued,
which alerts the Consumer that a new Buffer is now available.

      When the Data Consumer successfully dequeues a Logical Buffer
address, it is granted sole access to the Buffer.  That is, the
Consumer has direct access to the Buffer until it explicitly returns
the Logical  Buffer to the Buffer Space.  In the same manner, the
Data Producer is given exclusive access to the currently allocated
Logical Buffer. The  Producer is made to wait from the time the
filled Logical Buffer is enqueued until a new Logical Buffer is
allocated.  Once allocated the Producer is free to start subsequent
transfers.

      Algorithm

      Before a data transfer begins, a Logical Buffer is allocated
from the Buffer Space with its size being large enough to hold one
Block.  From then on the number of Blocks contained in...