Multi-producer and multi-consumer bounded lock-free queue and entry and exit method
The invention discloses a multi-producer multi-consumer bounded lock-free queue and an in-queue and out-queue method, relates to the technical field of data structures, and aims to solve the problem that concurrency is reduced due to sequential contraction actions in a catchup stage in the prior art...
Gespeichert in:
Hauptverfasser: | , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses a multi-producer multi-consumer bounded lock-free queue and an in-queue and out-queue method, relates to the technical field of data structures, and aims to solve the problem that concurrency is reduced due to sequential contraction actions in a catchup stage in the prior art and the additional problem generated when a CAS instruction is replaced by a high-efficiency instruction. The method comprises a production area and a consumption area, head and tail pointers are introduced into the two areas respectively, the head and tail pointers of the production area are called Pad and ptail respectively, the head and tail pointers of the consumption area are called CHAD and ctail respectively, and the Pad, the ptail, the CHAD and the ctail comprise version number areas; according to the method, the FAA instruction with better performance is used for replacing the CAS instruction in the request stage to update the head pointer, meanwhile, the problem that the pointer is abnormal possibly is s |
---|