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...

Which of the following icons should you click to insert a piece of clip art?

A.
B.
C.
D.

Computer Science & Information Technology

What is the purpose of the enable secret for a switch?

What will be an ideal response?

Computer Science & Information Technology

When a function is copied down one cell, an argument referencing cell A4 will change to ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

In reference to a counter tag, the bit that is true when the accumulated count is greater than or equal to the preset tag value is the ____________________ bit.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology