RE: eventio API

From: r.venning <r.venning@dont-contact.us>
Date: Tue, 20 Feb 2001 11:18:01 +1000

Hi,

Regards overlapped I/O, from the MS platform SDK, it is part of the Winsock2.
However if you also want to look at asynchronous disk subsystem, then I think
you need to have 'completion ports'.

Reading the MS platform documentation, completion ports are only available on
NT3.5/4.0/Win2K (and possibly WinME).

From the docs on "CreateIoCompletionPort"
-----
The CreateIoCompletionPort function can associate an instance of an opened
file with a newly created or an existing input/output (I/O) completion port,
or it can create an I/O completion port without associating it with a file.

Associating an instance of an opened file with an I/O completion port lets an
application receive notification of the completion of asynchronous I/O
operations involving that file.
-----

and

-----
Remarks
The I/O system can be instructed to send I/O completion notification packets
to I/O completion ports, where they are queued. The CreateIoCompletionPort
function provides this functionality.

After an instance of an open file is associated with an I/O completion port,
it cannot be used in the ReadFileEx or WriteFileEx function. It is best not to
share such an associated file through either handle inheritance or a call to
the DuplicateHandle function. Operations performed with such duplicate handles
generate completion notifications.

When you perform an I/O operation with a file handle that has an associated
I/O completion port, the I/O system sends a completion notification packet to
the completion port when the I/O operation completes. The I/O completion port
places the completion packet in a first-in-first-out queue. Use the
GetQueuedCompletionStatus function to retrieve these queued I/O completion
packets.

Threads in the same process can use the PostQueuedCompletionStatus function to
place I/O completion notification packets in a completion port's queue. By
doing so, you can use the port to receive communications from other threads of
the process, in addition to receiving I/O completion notification packets from
the I/O system.

------

Roger.

-----Original Message-----
From: Robert Collins [mailto:robert.collins@itdomain.com.au]
Sent: Tuesday, 20 February 2001 11:47 AM
To: Alex Rousskov
Cc: squid-dev@squid-cache.org
Subject: RE: eventio API

> -----Original Message-----
> From: Alex Rousskov [mailto:rousskov@measurement-factory.com]
> Sent: Tuesday, 20 February 2001 11:51 AM
> To: Robert Collins
> Cc: squid-dev@squid-cache.org
> Subject: RE: eventio API
>
>
> On Tue, 20 Feb 2001, Robert Collins wrote:
>
> > A side-question:
> > I don't actually know the win32 API terribly well :-[ -
>
> Neither do I. I know that MS folks told my team to add support for
> "overlapped I/O" to get decent performance from Polygraph on W2K.
> According to MS, performance using select/poll will be noticeably
> worse.
>
> > are overlapping I/O's available under win9x or are they a win2K
> > feature? I believe that win9x and above all have async tcp and
> > disk API's available.
>
> "Overlapped I/O" is a "Windows Sockets 2" feature. They are different
> from poll/select primitives. I do not know what Windows versions
> support "Windows Sockets 2".
>
> Alex.
>
> P.S. The correct term is "overlapped I/O" not "overlapping I/Os".
> Sorry about the typo.
>

Cool. Winsock 2 is available for windows 9x and above ( has to be
downloaded for some windows versions).

Thanks
Rob

-------------------------------------------------------
Roger Venning \ Do not go gentle into that good night
Melbourne \ Rage, rage against the dying of the light.
Australia <r.venning@bipond.com> \ Dylan Thomas
                                        
Received on Mon Feb 19 2001 - 18:17:49 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:33 MST