We discussed four types of asynchronous I/O: polling, waiting on an event object that signals the completion of the I/O, alertable I/O and using I/O completion ports. For each technique, describe a situation for which it is useful; also, state a drawback for each technique.

What will be an ideal response?

Polling can be useful when a thread is executing a loop; polling whether the I/O completes
can be one instruction in the loop.This allows a thread to do as much other processing
as possible and break away from this processing as soon as possible to process the I/O completion.
Polling can be difficult and wasteful when a thread is not executing a loop. Setting an
event object is useful when a thread is waiting on more than one object (i.e., the event object
and some other object, perhaps the completion of another I/O request). It can be inefficient
because a thread might be waiting for the I/O to complete for a long time, negating most of
the benefits of asynchronous I/O. Alertable I/O is more efficient than waiting on an event
object.A drawback is that only the thread making the I/O request can process the I/O completion;
also, a thread might spend a lot of time waiting in an alertable wait state, negating
some of the benefits of asynchronous I/O. I/O completion ports are useful when many
threads issue asynchronous I/O requests, and I/O completion ports allow any thread registered
with the port to process an I/O completion. In large server programs, in particular, I/O
completion ports are the most efficient mechanisms.A drawback to I/O completion ports is
that if there are few I/O requests, the high memory overhead for the threads waiting at the
port is not justified.

Computer Science & Information Technology

You might also like to view...

Pressing ________ is an alternative to clicking the Decrease List Level button when applying a new level to bulleted text

A) [Ctrl]+[Tab] B) [Tab] C) [Alt]+[Tab] D) [Shift]+[Tab]

Computer Science & Information Technology

A network's physical topology refers to the arrangement of the cabling and how the devices connect to each other.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology