I / O software is usually organized into the following layers -

  • User-Level Libraries - This provides easy interaction with the user system to perform input and output. For example, stdio is a library provided by C and C ++ system languages.
  • Kernel Level Modules - This allows the device driver to communicate with the device controller and the independent device I / O modules used by the device drivers.
  • Hardware - This layer installs real hardware and hardware controls that work with device drivers and make the hardware come to life.

A key point in the development of I / O software is that it should be an independent device where you should write programs that can access any I / O device without specifying the device in advance. For example, a program that reads a file as an input should be able to read the file on a floppy disk, hard disk, or CD-ROM, without changing the system of each separate device.

Software Input Output

Device Driver

Device drivers with software modules can be connected to the OS to manage a specific device. The operating system takes help from device drivers to manage all I / O devices. Device drivers enter device-dependent code and use a standard interface in such a way that the code contains a specific device read / write. Device driver, usually written by the device manufacturer and delivered along with the device to CD-ROM.

The device driver performs the following functions -

  • To receive an application from the above software above.
  • Collaborate with the device controller to capture and assign I / O and perform the required error management
  • Ensure that the application is successful

The way the device driver handles the request is as follows: Suppose the application arrives to read block N. If the driver does not do anything at the time the application arrives, you start applying immediately. Alternatively, if the driver is already busy with another application, he puts a new application in the waiting queue.

Interrupt Handlers

A hacker, also known as a hacking service or ISR, a piece of software or especially a replay function on an operating system or especially in a device driver, its execution is caused by the acceptance of the hack.

When a disruption occurs, the disruption process does whatever it takes to deal with the disruption, restores the formation of data and triggers the process that was waiting for the disruption to occur.

The interference machine receives an address ─ number that selects a specific interruption management process from a small set. In most construction sites, this address is an offset stored in a table called a interrupt vector table. This vector contains the memory addresses of special interruptions managers.

Independent I / O software for the device

The primary function of device-independent software is to perform standard I / O functions on all devices and to provide the same interface for user-level software. Although it is difficult to write completely independent software for the device but we can write some common modules for all devices. The following is a list of independent software functions for I / O device -

  • Different combination of device drivers
  • Device Naming - Mnemonic names are included in the map of device numbers large and small
  • Device protection
  • Provide stand-alone block size for device
  • Bathing because data from the device cannot be saved to its final destination.
  • Allocation of storage to block devices
  • Distribution and release of dedicated devices
  • Error Reporting

Uper-Space I / O Software

These are libraries that provide a rich and easy-to-use interface to access kernel functionality or ultimately communicate with device drivers. Most user-level I / O software has library processes among others such as spooling system which is a way to deal with I / O devices dedicated to duplication of programs.

I / O libraries (e.g. putchar (), Getchar (), printf () and scanf () are examples of user-level I / O library stdio available in the C program.

Kernel I / O sub-system

The Kernel I / O Subsystem is responsible for providing a number of I / O related services. The following are some of the services provided.

Scheduling - Kernel schduling a set of I / O requests for determining the best order to be implemented. When an application issues an I / O blocking system call, the application is placed in the queue for that device. Kernel I / O Editor rearranges line layout to improve system efficiency and average response time received by applications.

Buffering - The Kernel I / O Subsystem stores a memory location known as a buffer that stores data while it is being transferred between two devices or between an operating device. Bathing is done to deal with speed differences between the manufacturer and the buyer of the data stream or to sync between devices with different data transfer sizes.

Caching - Kernel saves cache memory which is a fast memory region that contains copies of data. Access to a backup copy works better than real access.

Spooling and Device Reservation - Spooling is a manager that stores data output on a device, such as a printer, that can receive linked data streams. The spooling system copies the spool files to each line. In some applications, spooling is managed by the system daemon process. For some applications, it is managed with the kernel cable.

Error Handling - An operating system that uses protected memory can protect you from many types of hardware and system errors.

All Topics of OS.