Why is it called Overlapped I / O?

All I can find are tutorials on using Overlapped I / O, but I can't find why this is called that.

Is it because, for example, I can read something from the socket and then read something else before the first reading will necessarily return the bytes that are being read?

+6
source share
3 answers

I think the idea (20 years ago) was that you could start IO, do some calculations or other work and wait for the result later. This is rarely done today. I think this idea comes from the time when select and poll were considered in the prior art.

The best name would be asynchronous IO. This is what any other platform calls. In fact, the MSDN documentation mixes two conditions.

+5
source

The classic value dates back to 1960 (or ealier), where overlapping I / O means that multiple I / O transfers can occur simultaneously (usually each I / O to another device) (for example, reading from tape and writing to disk simultaneously) . An alternative classic name for this was simultaneous I / O. This can be achieved with interrupts and / or hardware like DMA (in those days, some of the DMA hardware implementations looked more like a set of small processors)

Sample article for IBM mainframe:

Crowded I / O - IBM

+5
source

The Overlap operation in Microsoft Windows no longer means asynchronous in all other OS languages.

To adhere to your example, you start reading on the socket and do not expect success, but you are doing something completely different (maybe you are reading in another (!) Socket). Then ask if the first operation is completed. You can also set an event descriptor for this. Or give the CALLBACK function, which is called upon completion. In this case, the first call "blocks" the rest of your operations.

See also on wikipedia .

My suggestion why Microsoft (was) calling it overlapping is that it does not look like the start of a thread, it is more like starting an async task when there was no standard name for it. This is more like std::async than std::thread .

+1
source

Source: https://habr.com/ru/post/982847/


All Articles