Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"02-23-09 - Low Level Threading - Annotated Linkies"

7 Comments -

1 – 7 of 7
Blogger Brian said...

Are there any lock-free implementations of multi-producer or multi-consumer queues?

February 23, 2009 at 1:13 PM

Blogger dfan said...

No way, man. The head is where you get stuff.

If you think of any chronologically ordered set of things, isn't the tail the back end of it, the farthest from being ready?

When you get in line, do you get in at the head of the line or the tail of the line??

February 23, 2009 at 4:42 PM

Blogger cbloom said...

Yeah the line analogy certainly goes well with "head" being where you pop things.

BTW stacks also confuse me. Some people talk about popping the bottom of the stack. I guess they're thinking about the say stacks are usually done in memory with the bottom growing downward. I usually think of stacks as a literal physical "stack" like a deck of cards, so you push & pop the top of the stack, and the bottom is rarely seen.

February 23, 2009 at 5:03 PM

Blogger cbloom said...

"Are there any lock-free implementations of multi-producer or multi-consumer queues?"

Next post. Or maybe the one after that ;)

February 23, 2009 at 5:03 PM

Blogger cbloom said...

Though the links I posted contained some MP and MC algorithms if you're brave. Note that you almost always want MPSC or SPMC not MPMC , and I'll elaborate more in the next post.

February 23, 2009 at 5:05 PM

Blogger Brian said...

Hmm. I wonder if in the MPSC case if you do better with 1 MPSC queue or a bunch of SPSC queues and a round robin consumer strategy?

February 23, 2009 at 11:28 PM

Blogger dfan said...

Well, I (and all right-thinking people) do agree with you about stacks; the head (where you push and pop) is the top of the stack. I think every time I saw the concept of a stack introduced, they explained it in terms of a stack of plates.

February 24, 2009 at 10:22 AM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.