Patent ID: 6802066
Filing Date: 2004-10-05
Classification: G06F

Abstract:
A method of handling messages transmitted from a plurality of processes operating in a data processing system to a receiving process in said system comprising:establishing an n-slot circular a message buffer serving said receiving process and comprising a plurality of message slots; establishing a counter, the value of said counter representing the total number of messages which have been inserted in the buffer by said plurality of processes; employing an atomic processor operation to increment said counter each time one of said processes requests a message slot, thereby assigning a unique counter value to each message to be inserted in said buffer; determining the actual slot number assigned to a message in said buffer by determining the remainder of the counter value in view of the number of slots of said buffer; and responding to competing requests for the same slot from first and second of said processes to correctly allocate an available slot of said buffer to one of said first and second processes by determining whether the addition of Remove Count with Buffer Size is less than the Message Number; wherein the Remove Count is a count of the total number of messages removed from the buffer, the Message Number is the counter value assigned to the message to be inserted, and the Buffer Size is the number of slots in the buffer.