- Back to Home »
- I/O Management in Operating System
I/O Management in Operating System:
The I/O management module in the operating system provides a means by which a process can communicate with the outside world i.e. the mechanism for input and output information. Traditionally the I/O system is regarded as the most difficult to implement because of the different number of peripherals that can be used with a different configuration.
External devices mainly differ in the following ways:
1. Speed:
There may be a difference between the data transfer rates of various devices. A magnetic disk may be able to transfer 10^12 characters per second. A keyboard may transfer only a few characters per second depending on-the typist.
2. Amount of Data Transferred:
Data may be transferred in units of characters; words, bytes, blocks or records, according to the peripheral used.
3. Data Representation:
Data may be encoded in. different ways on different I/O media. Even on a single medium, such as magnetic tape, several different codes may be employed.
4. Permissible Operations:
Devices differ, in the kind of operation they can perform. One example is the distinction between input and output. One ability is to rewind a magnetic tape but not printer paper.
5. Error Conditions:
Failure to complete a data transfer may have various causes. A hardware detected data error or a printer that has run out of paper depending on the peripheral being used.
It would make the operating system too large if it caters for every specific detail. So I/O system must isolate the device characteristics and treat all devices uniformly possibly.
1. The I/O management module provides a common interface for user applications to interact with external devices. For example to output a file to some device the . interface may provide a common function called OUTPUTFILE.
2. It is up to the I/O management module to redirect the call from the user to the appropriate device driver. A device driver is a software module that manages the communication with a specific I/O device or type of device. It is the task of the device driver to convert the logical requests from the user into specific commands directed to the device itself.
3. For example on receiving the OUTPUTFILE command mentioned above, the device driver of a floppy drive would first check for the presence of a disk in the drive, locate the file via the filing system, position the heads on the floppy and the starts transferring data to the device controller.