Correct statement about select on windows
This commit is contained in:
parent
336a768a21
commit
1c15142618
@ -46,15 +46,20 @@
|
|||||||
is done in Unix.
|
is done in Unix.
|
||||||
|
|
||||||
<p>Windows presents asynchronous and non-blocking I/O differently than in Unix.
|
<p>Windows presents asynchronous and non-blocking I/O differently than in Unix.
|
||||||
The syscall <code>select()</code> is available in Windows but it
|
The syscall
|
||||||
supports only 64 file descriptors—which is unacceptable for
|
<a href="http://msdn.microsoft.com/en-us/library/ms740141(v=VS.85).aspx"><code>select()</code>
|
||||||
high-concurrency servers. Instead a system called <a
|
is available in Windows</a>.
|
||||||
href="http://msdn.microsoft.com/en-us/library/ms686358(v=vs.85).aspx">overlapped
|
<code>select</code> processing is O(n) in the number of file descriptors
|
||||||
I/O</a> is used. <a
|
unlike the modern constant-time multiplexers like epoll which makes it
|
||||||
href="http://msdn.microsoft.com/en-us/library/aa365198(VS.85).aspx">I/O
|
unacceptable for high-concurrency servers.
|
||||||
completion ports</a> (IOCPs) are the objects used to poll overlapped I/O
|
|
||||||
for completion.
|
<p>
|
||||||
IOCPs are similar to the Unix I/O multiplexers
|
Windows has another way of polling called
|
||||||
|
<a href="http://msdn.microsoft.com/en-us/library/aa365198(VS.85).aspx">I/O completion ports</a>
|
||||||
|
(IOCPs). IOCPs are the objects used to poll
|
||||||
|
<a href="http://msdn.microsoft.com/en-us/library/ms686358(v=vs.85).aspx">overlapped I/O</a>
|
||||||
|
for completion. IOCP polling is constant time (REF?).
|
||||||
|
They are similar to the Unix I/O multiplexers
|
||||||
<ul>
|
<ul>
|
||||||
<li> <a
|
<li> <a
|
||||||
href="http://en.wikipedia.org/wiki/Kqueue">kqueue</a> on Macintosh and
|
href="http://en.wikipedia.org/wiki/Kqueue">kqueue</a> on Macintosh and
|
||||||
@ -536,7 +541,7 @@ IOCP:
|
|||||||
— an async <code>sendfile()</code> for windows.
|
— an async <code>sendfile()</code> for windows.
|
||||||
<li><a href="http://msdn.microsoft.com/en-us/library/ms741565(v=VS.85).aspx"><code>WSADuplicateSocket()</code></a>
|
<li><a href="http://msdn.microsoft.com/en-us/library/ms741565(v=VS.85).aspx"><code>WSADuplicateSocket()</code></a>
|
||||||
— describes how to share a socket between two processes.
|
— describes how to share a socket between two processes.
|
||||||
<li><a href="http://msdn.microsoft.com/en-us/library/6e3b887c.aspx"><code>_setmaxstdio()</code></a>
|
<li id="setmaxstdio"><a href="http://msdn.microsoft.com/en-us/library/6e3b887c.aspx"><code>_setmaxstdio()</code></a>
|
||||||
— something like setting the maximum number of file decriptors
|
— something like setting the maximum number of file decriptors
|
||||||
and <a
|
and <a
|
||||||
href="http://www.kernel.org/doc/man-pages/online/pages/man2/setrlimit.2.html"><code>setrlimit(3)</code></a>
|
href="http://www.kernel.org/doc/man-pages/online/pages/man2/setrlimit.2.html"><code>setrlimit(3)</code></a>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user