[lkml]   [1999]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Linux Driver - Select Implementation!
Jeff Epler <> wrote:
> What would the consequences be of a select-like call which had the semantic
> that only one of the tasks sleeping for that resource was woken (the
> longest-sleeping, perhaps)? (And, probably, all tasks sleeping because
> of regular select()) To my naive mind it sounds like a way to avoid
> the thundering herd problem. Are there unforseen pitfalls in this, or is
> it more a matter of doing something nonstandard, or of the change requiring
> widespread kernel changes?

This thundering herd problem can be solved in userland, if I am not mistaken.
From what I've read, Apache solves this problem by having a single task do the
select(), and setting an appropriate semaphore on return. The rest of the
tasks which would normally do a select() instead wait on this semaphore -- when
the semaphore is available, a single task is unblocked from waiting on it.

Charles Cazabon <>
Any opinions expressed are just that -- my opinions.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:50    [W:0.089 / U:4.216 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site