Lock Free Queue -- Single Producer, Multiple Consumers

Posted by Shirish on Stack Overflow See other posts from Stack Overflow or by Shirish
Published on 2010-04-23T22:25:51Z Indexed on 2010/04/24 1:03 UTC
Read the original article Hit count: 432

Filed under:
|
|
|

Hello,

I am looking for a method to implement lock-free queue data structure that supports single producer, and multiple consumers. I have looked at the classic method by Maged Michael and Michael Scott (1996) but their version uses linked lists. I would like an implementation that makes use of bounded circular buffer. Something that uses atomic variables?

On a side note, I am not sure why these classic methods are designed for linked lists that require a lot of dynamic memory management. In a multi-threaded program, all memory management routines are serialized. Aren't we defeating the benefits of lock-free methods by using them in conjunction with dynamic data structures?

I am trying to code this in C/C++ using pthread library on a Intel 64-bit architecture.

Thank you, Shirish

© Stack Overflow or respective owner

Related posts about c++

Related posts about pthreads