CONTENT
WHAT IS IO?
WHAT IS BLOCK IO
WHAT IS NON BLOCK IO
THE DIFFERENCE BETWEEN IN BLOCK IO AND NON -BLOCK IO
WHAT IS IO
In computer ,the term I/O is short for "Input/Output" , which refers to the transfer of data either to or
from a computer application. A keyboard acts as an input device ,transferring whatever you type into the computer, while a monitor or printer would be an example of an output device, since they present the transferred data to the user. Blocking I/O plays a key role in the entire process ,helping manage the flow of input and output data. NON Blocking I/O is too. They are synchronouse IO (there is also have asynchronous IO).
WHAT IS BLOCKING I/O
Above mention that .the Blocking I/O ,sometimes referred to as synchronous I/O, blocks the data transfer process until the accessed driver can meet the desired request. For example , if you input a call to read a drive when there is no data present, blocking I/O puts the process to sleep until there's available to read. Once the drive can fulfill the request, the process awakens and completes the command. Blocking I/O plays the same role if you attempt to write to a drive before it has enough available buffer space, halting the process until the necessary space becomes available.
WHAT IS NON-BLOCKING I/O
Non-Blocking I/O Unlike blocking I/O, which halts a process until the full request can be met,non-blocking I/O may fulfill the request in segments.
THE DIFFERENCE BETWEEN IN BLOCK IO AND NON -BLOCK IO
For instance, if the requested data isn't available in ites entirety when called, a non-blocking I/O retrieves all available data and the returns it,
alerting the user the entire request wasn't fulfilled. The non-blocking I/O then continues to loop back and gather more information until completing the desired request. While more difficult to code than blocking I/O, non-blocking I/O provides more power and permits other processes to continue while completing the
original data transmission.