Re: Thread implementations...

Alan Cox (alan@lxorguk.ukuu.org.uk)
Fri, 19 Jun 1998 20:38:15 +0100 (BST)


> > the kernel wakes up one, which handles that socket alone, using
> > blocking I/O (it uses alarm(2) to do timeouts).
>
> This demonstrates the point that select and poll are workarounds for
> the lack of threading support in Unix. They aren't needed if you use
> a threads facility (or a separate process for each thread you need).

Actually select and poll are more efficient ways of describing most
multiple source event models without the overhead of threads.

And there are plenty of cases where each one is better. Select is clearly
a better model for inetd for example.

> accept() is a system call. accept(2) is not a system call, it is a
> manual page. One doesn't block on accept(2), one *reads* accept(2)
> to find out how to use accept().

Using accept(2) to indicate you are talking about the system call goes
back to at least my student days read comp.unix.wizards

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu