Messages in this thread | | | Date | Sat, 27 Feb 1999 07:31:05 +1100 | From | Richard Gooch <> | Subject | Re: 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/
| |