lkml.org 
[lkml]   [1999]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux Driver - Select Implementation!
Jeff Epler writes:
> On Fri, Feb 26, 1999 at 02:56:58PM +0000, Alan Cox wrote:
> > > When multiple applications issue a select on the same device (driver),
> > > Is there any way to notify only one of the application from the driver?
> >
> > No. The select specification is quite explicit that everyone sleeping is
> > woken
>
> 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?

A better approach, implemented by Richard Henderson, is to send a
POSIX RT signal with the fd in the siginfo structure. This is like
what people call "completion ports". As long as you aren't required to
use a portable interface like select(2) or poll(2), this is a much
better approach.

Regards,

Richard....

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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