user4407915
user4407915

Reputation:

Why is it called Overlapped I/O?

All I can find is tutorials on how to use Overlapped I/O, but I can't find why is it called like that.

Is it because for example I can read something from a socket, and then read something else before necessarily the first read returns the bytes read?

Upvotes: 18

Views: 8526

Answers (3)

rcgldr
rcgldr

Reputation: 28828

The classic meaning dates back to the 1960's (or ealier), where overlapped I/O meant that multiple I/O transfers (normally each I/O to a different device) could occur at the same time (like concurrent reads from tape and writes to disk). An alternative classic name for this was concurrent I/O. This could be accomplished via interrupts and/or hardware similar to DMA (in those days, some of the DMA hardware implementations were more like a set of small processors)

Example article for IBM mainframe:

Overlapped I/O - IBM

Upvotes: 16

usr
usr

Reputation: 171178

I think the idea was (20 years ago) that you could start an IO, perform some computation or other work and later wait for the result. This is rarely done today. I think this idea comes from a time where select and poll were considered state of the art.

A better name would be asynchronous IO. That's what every other platform seems to call it. In fact the MSDN documentation mixes the two terms.

Upvotes: 10

Martin Schlott
Martin Schlott

Reputation: 4547

Overlap operation in Microsoft Windows means nothing else as asynchron in everybody else OS-language.

To stick to your example, you start a read on a socket and do not wait for success but do something completely different (maybe read on a different(!) socket). Then ask if the first operation is finished. You can also set an event-handle for that. Or give a CALLBACK function which is called on completion. In that case, the first call "overlapped" the rest of your operations.

Look also at wikipedia.

My guess why Microsoft is(was) calling it overlapped is that it is not like starting a thread, more like to start an async task at a time there was no standard name for it. It is more like std::async than std::thread.

Upvotes: 6

Related Questions