I/O Completion Ports

Here are some resources for anyone interested in learning about I/O completion ports. I first introduced I/O completion ports in a series about parallel programming with asynchronous procedure calls (APCs):

Asynchronous Procedure Calls

Asynchronous Procedure Calls and Window Messages

Queuing Asynchronous Procedure Calls

I/O Completion Ports

I/O completion ports define a threading model for supporting scalable I/O but it is not very easy to get it right. The hardest part is thread management. Fortunately, the kernel developers responsible for operating system threads later introduced the Windows Thread Pool API. This is a very thin abstraction over I/O completion ports. This is what you should use today instead of relying on the I/O completion port functions directly. I wrote a series about the thread pool for MSDN Magazine:

C++ and the Windows API

The Windows Thread Pool and Work

The Thread Pool Environment

Thread Pool Cancellation and Cleanup

Thread Pool Synchronization

Thread Pool Timers and I/O

Naturally, any topic related to I/O and threads requires a good understanding of Windows synchronization. Here are a pair of articles that will get you up to speed:

The Evolution of Synchronization in Windows and C++

The Evolution of Threads and I/O in Windows

I also illustrate many of these techniques in my Modern C++ Concurrency course on Pluralsight.

Finally, if Microsoft needs help fixing Windows.Storage then just let me know. 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s