Interview Question
Country: United States
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. 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.
Synchronous: Blocking I/O, a process waits until request for I/O is completed and then resumes I/O
- kd September 15, 2012Asynchronous: Non Blocking I/O, process requests I/O, until I/O is serviced another job is processed, when I/O completes, process is interrupted to operate on data from I/O