Open
Description
Overview
It would be useful to develop another data structure: lock-free bag. Below describes what it is, notes potential uses and links a paper with design.
Bag
Bag (or multiset) is a data structure, which stores a collection of values. Elements are inserted or removed one at a time. In contrast with queue or stack, bag has no ordering. That is remove can return the youngest, oldest or any other item currently in the bag. In principle, lack of ordering eliminates contention points and should lead to better throughput and scalability.
Uses
- Better throughput for Domainslib than with stack or queue (for workloads without significant locality between tasks).
- Better throughput for Reagents Replace MSQueue with concurrent lock-free bag. reagents#4
Design
A lock-free algorithm for concurrent bags proposes a compelling approach. See figure 4 for performance comparison with some classical structures, e.g. Michael Scott queue.
Activity