Handmade Hero » Forums » Code » IO completion ports explanation
marius_a
Marius Adaškevičius
22 posts
#6830 IO completion ports explanation
1 year, 5 months ago

This is probably a bit off-topic but maybe someone has a link to Casey's explanation of IO completion ports on one of Shawn McGrath streams? I found it really informative but I don't think Shawn has uploaded it to YouTube as promised and it's not available on Twitch anymore :(
midenfors
Magnus
1 posts

None

#6833 IO completion ports explanation
1 year, 5 months ago

Hello Marius,

I was looking for that myself a month or so ago but figured that I had delted the twitch VOD but your question prompted me to have another look. Apparently it was not lost.

Here's the audio for the io completion ports portion: sssmcgrath_cmuratori_io_completion_ports.ogg

I'll check with sssmcgrath if he wants to put up the whole video.

Regards,
Magnus

None
marius_a
Marius Adaškevičius
22 posts
#6838 IO completion ports explanation
1 year, 5 months ago

Thank you, Magnus!
sssmcgrath
Shawn McGrath
1 posts
#6844 IO completion ports explanation
1 year, 5 months ago

I'm like 99% sure I posted that video on youtube but I can't find it =/ I'll gladly upload any missing videos.
cmuratori
Casey Muratori
803 posts
1 project

Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.

#6846 IO completion ports explanation
1 year, 5 months ago

There is one downside to IO completion ports, which is unfortunate, which is that you cannot use an IO completion port handle in a call to WaitForMultipleObjects :( I have no idea why they didn't implement this. Probably because they maybe didn't realize how good the API was? Maybe they just lucked into it? I don't know.

- Casey
typedefstructer
vivek
1 posts

None

#6847 IO completion ports explanation
1 year, 5 months ago

How Can I subscribe to this thread??

None
ChronalDragon
Andrew Chronister
184 posts
2 projects

Developer, administrator, and style wrangler

#6848 IO completion ports explanation
1 year, 5 months ago

typedefstructer
How Can I subscribe to this thread??


No way at the moment, we'll have something for you in the next couple weeks.
gazto
Carlos Gabriel Hasbun Comandari
32 posts

|· noise ·|

#6885 IO completion ports explanation
1 year, 5 months ago

"Please note that while the packets are queued in FIFO order they may be dequeued in a different order."

·| What on earth does that mean?

|· We were all born equal... except for all those things that set us apart. ·|
ratchetfreak
303 posts
#6888 IO completion ports explanation
1 year, 5 months ago

gazto
"Please note that while the packets are queued in FIFO order they may be dequeued in a different order."

·| What on earth does that mean?


It means that not all IO operations complete in the same order as they were submitted.

Or if talking about UDP it's a property of the protocol that packets may arrive out of order (or not arrive at all).
cmuratori
Casey Muratori
803 posts
1 project

Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.

#6891 IO completion ports explanation
1 year, 5 months ago

ratchetfreak
It means that not all IO operations complete in the same order as they were submitted.
Or if talking about UDP it's a property of the protocol that packets may arrive out of order (or not arrive at all).

I don't know if that is a reasonable explanation to OP's question though. Those are things that happen before the IOCP message gets queued, so I doubt that is what that line would have been talking about. The IO completion port does not have anything queued on it until an IO operation completes, and then it gets queued. So unless that sentence was just a very poor choice of words, it can't be talking about the fact that the IO's don't complete in order, because they are not queued on the port, only their completion is. Hence the name "IO completion port" :)

OP: Where'd that line come from, BTW?

- Casey
gazto
Carlos Gabriel Hasbun Comandari
32 posts

|· noise ·|

#6895 IO completion ports explanation
1 year, 5 months ago Edited by Carlos Gabriel Hasbun Comandari on May 8, 2016, 7:12 p.m.

I found it to be weird because FIFO is supposed to mean "first in, first out", yet immediately after it is written: "they may be dequeued in a different order.", it's an oxymoron.

Source:
https://msdn.microsoft.com/en-us/...ws/desktop/aa365198(v=vs.85).aspx

|· We were all born equal... except for all those things that set us apart. ·|