Synchronous I/O
Synchronous I/O is a mechanism in which the process is blocked until the I/O operation is completed. This can happen when there is no way for processes to continue until their scheduled event has finished. In this case, synchronous I/O needs to wait patiently till it has been given permission by its supervisor program to proceed with further processing.
Asynchronous I/O, or nonblocking I/O (NBIO), is a mechanism in which the process continues its execution without waiting for the I/O operation to complete. For example: if the user wants to read data from disk and then write that data back onto disk later on – then asynchronous IO would suit this scenario perfectly well because it means that your program will continue running even after completing its task of writing new records onto disk or reading existing ones off.
Blocking and Nonblocking IO in Operating System
Blocking and non-blocking IO are two different methods used by OS to handle I/O operations. A blocking call is where the OS decides that it needs to wait for a certain operation to complete before allowing the program to continue execution. The result of this is that user can’t do anything else while waiting on a system call; if your program doesn’t have any other activity, then it should be able to wait indefinitely without causing any problems. On the other hand, non-blocking calls (also known as asynchronous operations) don’t block the thread until they finish their work; instead, this type of system call returns immediately after completing its job without having any effect on what’s happening in other threads.
Contact Us