Patent ID: 7895390
Filing Date: 2011-02-22
Classification: G06F

Abstract:
1. A method for ensuring availability of buffers prior to writing thereto, the method comprising: (a) maintaining a plurality of register sets at a computing device executing a plurality of processes, the plurality of register sets corresponding to a plurality of buffers located at another device, each register set including a status indicator and a generation counter both used to determine if a buffer is available for writing; wherein the status indicator controlled by a buffer availability manager indicates if a buffer is busy or not busy; and the generation counter is set by the buffer availability manager to a common default value during initialization, before the plurality of buffers are made available for writing to the plurality of processes; (b) prior to writing to any buffer from among the plurality of buffers, a process from among the plurality of processes reading the plurality of register sets to find a buffer whose corresponding register set indicates that the buffer is not busy indicating that the buffer is available; (c) after finding the buffer that is not busy, comparing a current value of the generation counter to a stored value of the generation counter that is maintained by the process; wherein the process compares the current value to the stored value; (d) writing data to the buffer (i) only if the status indicator for the buffer indicates that the buffer is not busy and (ii) if the current value of the generation counter is not equal to the stored value of the generation counter indicating that the generation counter has been updated since prior to a last write operation or if the process has not previously written data to the buffer, as determined by the process by maintaining an internal mechanism to indicate whether the buffer has been previously written; wherein if the generation counter value has not changed since the last write operation, the process finds another buffer for writing data; (e) in response to the writing of data to the buffer, updating the status indicator to indicate that the buffer is busy; wherein the buffer availability manager updates the status indicator, and (f) after processing the data in the buffer, updating the status indicator to indicate that the buffer is not busy, and updating the value of the generation counter to indicate that the buffer is again available for writing; wherein the buffer availability manager updates the status indicator and the generation counter value.