async I/O
-
pskyboy
Re:async I/O
No you could as the memory and Hard drive use different buses. But otherwise your right you couldn't and i can't see it being done on a none SMP system.
Peter
Peter
-
neowert
Re:async I/O
I may be very wrong about this, but I thought the CPU wrote to just one bus, but that bus branched into several others. I am just guessing, I have never read about such a thing.
-
Tim
Re:async I/O
Asynchronous I/O is very useful because it allows an application to do what it wants while waiting for the hardware to finish what it is doing. The bus doesn't come into it, since bus I/O is atomic: bus I/O only takes place during IN or OUT instructions.
Synchronous I/O:
Asynchronous I/O:
Application using async I/O:
Synchronous I/O:
Code: Select all
void read()
{
queue_command_to_device();
wait_for_irq();
read_data_from_device();
return_results();
}Code: Select all
void read()
{
queue_command_to_device(completion_function);
return;
}
static void completion_function()
{
read_data_from_device();
return_results();
}Code: Select all
int main()
{
handle_t event;
// Pure async I/O
read(device, event);
while (!is_event_signalled(event))
do_something_useful();
// Async I/O as sync I/O
read(device, event);
wait_for_event(event);
}