State-based queue protocol
Abstract:
Methods and systems for execution of data operations in a queue are described. One method includes loading a pointer to a record in a lock-free ring buffer by an executing thread, as well as calculating an index from the pointer to a record to be processed and obtaining a header of the record to be processed. Based on the header, a state of the record to be processed is determined from among: a filled state, a filling state, a drained state, and a draining state. A candidate header is created which includes an updated state indicating that the record is in use by the executing thread. An atomic operation is performed to update the header of the record to the candidate header. Upon successful completion of the atomic operation to update the header of the record to the candidate header, a data operation is performed on the record.
Public/Granted literature
Information query
Patent Agency Ranking
0/0