Techniques for Device Management in an Operating System

Techniques for Device Management in an Operating System 

INTRODUCTION:

Device-management

One of the main functions of operating systems is to manage and control all input/output operations and the input/output (I/O) devices attached to the computer system. Therefore, there exists an (I, O) system, which is actually a subsystem and an integral part of all the operating systems. It controls and manages the function of  I/O devices. It also provides a uniform interface between application or user and me/O devices to perform different I/O operating such as:
Write and read data to and from the secondary storage.
Send output to output devices such as to monitor, printer or potter, etc.
Get input from input devices such as keyboard and scanner etc.
Different users view I/O devices from a different point of view. 

For example:

hardware engineer views the I/O devices in terms of different components such as chips, I/O ports, power cables, etc. That makes up the I/O device. Similarly, software engineer looks at the functions that can be performed by the I/O devices. This chapter is relevant to the software engineer's (or programmer) viewpoint.
The basic I/O hardware components such as ports (i.e. USB ports, COM ports), buses, and device controllers accommodate automatically a wide variety of I/O devices. Ports act as a plug to connect  I/O devices to the computer system. Data and command singles are communicated between different components of the computer through a computer bus. A bus is a set of wires to which these ports and devices controllers are connected for data communication. The kernel of the operating system uses the device driver module to control the functions of I/O devices. The device drivers are the I/O software that controls the actual functions of the I/O devices.
I/O hardware Organisation.
Software Organisation.
Some devices are related to I/O operating.

I /O HARDWARE ORGANIZATION:

A modern computer system can handle many kinds of I/O devices. Typically, the architecture design of most of the computer systems is similar. The I/O devices, memory, and CPU communication with each other through one or more communication buses. A device communicates with a computer system by sending signals from one location to another location. Usually, all the old microcomputers and minicomputers had a single bus architecture. The single bus mainframe computers have been using multiple bus architecture.

Explanation:

In the above single bus architecture, communication can take place between two devices at a time. Therefore, a specific type of protocol is required to control the communication at any particular time between different devices on a single bus. For this purpose, time is divided into clock cycles. One clock cycle is needed to send a signal piece of information on the bus. A special device called a bus arbiter schedules the communication of devices on the bus. This device is responsible for making decisions like which devices can communicate during the next cycle. The selected devices may communicate with another device (to which the selected device needs to communicate), provide that the device is connected to the bus. An addressing mechanism is used to identify the destination device.

A bus is allocated to the CPU for data communication with the main memory. The CPU has a very high speed and therefore utilizes the bus efficiently, However, I/O devices are slower than CPU. Therefore, the requests for allocating bus from I/O devices are given higher priority than CPU. The bus is taken from the CPU and given to the I/O devices. 

The process of taking the bus away from the CPU and giving it to the I/O devices is called cycle stealing.

Device Controller:

An electronic device in the form of a chip or circuit board that controls the functioning of the I/O device is called the device controller or I/O Controller or adopter Operating system directly deals with the device controller.
Some devices are very simple in design. 

For example:

a serial port controller is a simple device controller in a computer system. It is a single chip inside the computer system, which controls signals on the wires of a serial port. On the other hand, some controllers are complicated such as the SCSI bus controller, It is a complete circuit board has a connector to which a data cable of the device is plugged.
Further, some devices have their own built-in controller. 

For example:

 a disk drive has its own circuit board, which is built into the drive. This circuit board is actually the disk controller.

Explanation:

Each I/O controller is designed specifically to handle a particular kind of device management in a system. CPU communicates with the I/O device through the device controller of that device. CPU sends signals to devise controller to perform a specific I/O operating such as read or write operating. For example, the CPU sends a command to the controller to read a byte of information from a serial device or to read a sector of information from the disk. In the case of a serial device, the controller collects a serial bit stream, converts it into a block of bytes, and perform necessary error correction. The block of bytes is typically first assembled, bit by bit, in a buffer inside the controller, and then is copied to main memory. Similarly, the controller for a monitor also works as bit-serial device management in a computer network system. It reads bytes (containing the characters or graphics to be displayed) in a network system. from main memory, and generates the signals used to modulate the CRT beam to display the output on the screen in a readable form. The operating system initializes the controller with a few parameters (such as several characters per line and number of per line screen to be displayed) CPU gives the responsibility to the controller by sending commands and remains busy to perform other tasks. Most of the controllers can handle multiple devices.

Controller Register:

There are different kinds of I/O controllers or modules in computer network systems to manage software. Each controller has one or more registers that are used to communicates with the CPU. The number of registers in a module (or controllers) and their function depends on the type of module. A module simple input device may have two registers. In this case, one register is used for data holding, which is known as the data buffer register and the other for control information which is known as the control register.

The control bits in the control register perform the following functions:
  1. Enabling the device.
  2. Resetting the device.
  3. Starting a read or write operations.
  4. Communicating information to the CPU.
  5. Signaling from device status.
  6. Signaling different kinds of error conditions.
  7. Signaling about the completion of operations.

I/O Channels:

Some sophisticated systems use special I/O channels and I/O control units for input and output operations. In these systems, the CPU communicates with the I/O channels, which in turn communicates with an I/O control unit.

Comments

Popular posts from this blog

Modern scenario of information technology:

Types of Data Access Methods

Output devices Tutorials point