recategorized by
17,718 views
41 votes
41 votes

Which of the following statements about synchronous and asynchronous I/O is NOT true?

  1. An ISR is invoked on completion of I/O in synchronous I/O but not in asynchronous I/O

  2. In both synchronous and asynchronous I/O, an ISR (Interrupt Service Routine) is invoked after completion of the I/O

  3. A process making a synchronous I/O call waits until I/O is complete, but a process making an asynchronous I/O call does not wait for completion of the I/O

  4. In the case of synchronous I/O, the process waiting for the completion of I/O is woken up by the ISR that is invoked after the completion of I/O

recategorized by

6 Answers

1 votes
1 votes

In hope this makes more sense 

In synchronous file I/O, a thread starts an I/O operation and immediately enters a wait state until the I/O request has completed.Due to waiting there is wastage of time and this time is utilised in asynchronous io

A thread performing asynchronous file I/O sends an I/O request to the kernel by calling an appropriate function. If the request is accepted by the kernel, the calling thread continues processing another job until the kernel signals to the thread that the I/O operation is complete. It then interrupts its current job and processes the data from the I/O operation as necessary.

 

1 votes
1 votes
→ Synchronous I/O mean that some flow of execution (such as a process or thread) is waiting for the operation to complete.
Asynchronous I/O means that nothing is waiting for the operation to complete and the completion of the operation itself causes something to happen.
→ Synchronous I/O -- some execution vehicle (like a process or thread) that initiates the I/O also waits for the I/O to complete (and perhaps completes it). When the I/O completes, that same execution vehicle goes on to do something else, perhaps using the results of the I/O.
→ Asynchronous I/O -- no execution vehicle waits for the I/O to complete. When the I/O completes, whatever execution vehicle happens to complete the I/O may arrange for later things to happen.
Option B is not true, because both synchronous and asynchronous I/O, an ISR (Interrupt Service Routine) is not invoked after completion of the I/O.
Answer:

Related questions

39 votes
39 votes
3 answers
1
7 votes
7 votes
3 answers
3
44 votes
44 votes
5 answers
4