Method and system for queuing data for multiple readers and writers
AssigneeTravelport, LP
InventorBryan Karr
Life of this patent
Estimating the term…
Abstract
Systems and methods of queuing data for multiple readers and writers are provided. Enqueuing operations are disclosed that can process write functionality and can determine whether ring buffers have potentially filled, and dynamically declare a new ring buffer at a multiple of capacity of the current ring. Dequeuing operations are disclosed that can process read functionality for advancing control and determining whether and when to free ring buffers from memory.
Claims16
A computer-implemented method of allocating a ring buffer, the method comprising:
- storing a first ring buffer comprising x elements, wherein x is a positive integer greater than two;
- determining that the first ring buffer is full;
- and
- allocating a second ring buffer, wherein the second ring buffer contains at least x+1 elements.
A computer-implemented method of deallocating a ring buffer, the method comprising:
- storing a queue comprising at least one pointer;
- determining that a first ring buffer is empty based on a head pointer being associated with the first ring buffer, and a drain pointer being associated with the second ring buffer;
- and
- deallocating the first ring buffer.
A computer-implemented method of deallocating a ring buffer, the method comprising:
- storing a first ring buffer having a plurality of elements;
- storing, in a local field, values corresponding to a current front element of the first ring buffer and an end element in the first ring buffer;
- determining that the first ring buffer is empty because the first ring buffer either:
- is not blocked and is not wrapped, or
- the first ring buffer is blocked and the value of the current front element is not in a position corresponding to the end element;
- and
- deallocating the first ring buffer.
A computer-implemented method of storing a queue, the queue associated with at least one ring buffer, the method comprising:
- storing at least one queue attribute that points to at least one attribute of a first ring buffer, wherein the at least one queue attribute includes one or more of:
- a head pointer,
- a drain pointer,
- a value corresponding to a quantity of readers, or
- a value corresponding to a quantity of writers.
Dependencies are inferred from the claim text.