Patent ID: 11960933
Assignee: RED HAT, INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 6:
7. A system comprising:
a memory configured to store a plurality of memory chunks;
at least one processor configured to execute a plurality of producer threads and a plurality of consumer threads, wherein a producer thread of the plurality of producer threads is configured to:
receive an offer request associated with an item,
responsive to receiving the offer request, arithmetically increase a sequence according to a fetch-and-add instruction,
determine (i) a chunk identifier, associated with the sequence, of a memory chunk from a pool of memory chunks and (ii) a first slot position, from the sequence, in the memory chunk to offer the item, wherein the sequence contains values corresponding with slot positions and the first slot position is a next slot position in the sequence which corresponds to a second slot within the memory chunk,
compare the chunk identifier with a current producer memory chunk,
walk the current producer memory chunk backwards to match the chunk identifier, and
write the item into the memory chunk at the first slot position;, wherein a first consumer thread of the plurality of consumer threads is configured to:
consume the item at the first slot position; and, wherein a second consumer thread of the plurality of consumer threads is configured to:
consume another item at a second slot position in the memory chunk,
determine that the memory chunk is recyclable by referring to a consumer buffer coordinating the plurality of consumer threads, and
recycle the memory chunk.