Friday, February 06, 2009 11:57 AMHow do things like UMS threads and the concurrency library fit in with IOCP?
Monday, February 09, 2009 4:26 PMThis is probably an oversimplification as the question was a little general, so please clarify if necessary.
IO Completion Ports (and overlapped IO) offer an explicit means for programming around asynchronous operations on things like file handles for local and network IO. The Concurrency Runtime also provides an explicit model, but more general purpose model, for this via the message passing APIs in the Asynchronous Agents library. I.E. the user can send a message and either wait on it explicitly or create a data flow pipeline to process the message.
The challenge of course in doing this in user mode is that you don't have a good idea of where the blocking is occurring, so the message passing APIs are great for CPU intensive work, but to do I/O or long latent operations in them, you would need to oversubscribe the system in some cases (which there APIs for in the Concurrency Runtime).
This is where UMS threads can help. UMS gives the runtime awareness of the blocking calls, allowing the Runtime to selectively oversubscribe the system and run additional work if it has been described, which I/O completion ports also offer. UMS threads + the Concurrency Libraries make the selective oversubscription implicit rather than explicit.
What this means is that if you are doing something more real where there is a significant amount of I/O and a significant amount of CPU processing (like image processing for example) there is a chance to see some good speedups, without having to code directly to I/O completion ports.
Rick Molloy Parallel Computing Platform : http://blogs.msdn.com/nativeconcurrency