Browse Prior Art Database

Data Buffer Mechanism

IP.com Disclosure Number: IPCOM000060785D
Original Publication Date: 1986-May-01
Included in the Prior Art Database: 2005-Mar-09
Document File: 2 page(s) / 14K

Publishing Venue

IBM

Related People

Avery, TM: AUTHOR [+3]

Abstract

This article relates to data communication and more specifically to the allocation of transmit and receive buffers in a manner designed to preserve performance and prevent deadlocks. These objectives are obtained by pre-allocating buffers to a "receive" stack and a "transmit" stack and continually recalculating worst-case conditions for each sensing process as buffer requests are received. If the calculation indicates a shortage of buffers, the requesting process is denied buffer access until enough buffers are available to handle the expected worst case for that process. In devices with limited resources, the amount of space available for communication buffers can be small. Therefore, the possibility exists of being overrun with data to the extent that all of the communication buffers are being used.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 51% of the total text.

Page 1 of 2

Data Buffer Mechanism

This article relates to data communication and more specifically to the allocation of transmit and receive buffers in a manner designed to preserve performance and prevent deadlocks. These objectives are obtained by pre-allocating buffers to a "receive" stack and a "transmit" stack and continually recalculating worst- case conditions for each sensing process as buffer requests are received. If the calculation indicates a shortage of buffers, the requesting process is denied buffer access until enough buffers are available to handle the expected worst case for that process. In devices with limited resources, the amount of space available for communication buffers can be small. Therefore, the possibility exists of being overrun with data to the extent that all of the communication buffers are being used. This causes a deadlock which will eventually terminate communications between the local device and the communication partner. In devices without limited resources it would be possible to maintain a large enough pool of buffers to accommodate all incoming data and prevent a deadlock. This would be an expensive solution. In addition, determining how many buffers are "enough" is very difficult. The solution proposed here is to create two stacks of pre-allocated buffers. One stack is for receipt of data and sending of communication level commands, and the other is for transmission of data. A worst-case algorithm is devised to determine the minimum number of buffers needed for each stack. The worst case for the transmit buffer stack is defined as that case ensuring device response in normal and in simple error cases. In the event of a complex problem (a low percentage occurrence), an algorithm starts an error process which waits for enough buffers to be freed to complete the error process. This is not considered a performance degradation since performance is "not" a consideration when handling an error situation. When the device is ready to transmit data, a buffer is obtained from the transmit stack. If a calculation of worst-case conditions indicates that there are not enough buffers available, the process will go into a wait state waiting for a buffer and set a flag denoting that it is waiting. Since many processes can start da...