Even though the hardware perspectives of I/0 are complicated when acknowledged at the level of specification of electronics-hardware layout, the thoughts that we've just described are sufficient to enable us to know many I/0 features
of the OS. Let's examine the most concepts:
- A bus
- A controller
- An I/0 port and its registers
- The handshaking relationship between the host and a tool controller.
- The execution of this handshaking during a polling loop or via interrupts.
- The offloading of this work to a DMA controller for giant transfers.
We provided a fundamental standard of the handshaking that happens among a device controller and therefore the host earlier during this section. actually, the wide diversity of possible devices poses a dilemma for operating-system implementers. Each kind of system has its own set of capacities, control-bit descriptions, and protocols for communicating with the proprietor, And they're all different. How can the OS be designed in order that we will attach new devices to the computer without editing the operating system? And when the devices vary so widely, how can the OS offer a convenient, uniform I/0 interface to applications? We address those questions next.
One of the crucial tasks of an OS is to regulate multiple I/O devices like mouse, keyboards then on. An I/O system is essential to push an application I/O call and send it to the real device, then take the response that comes back from the device and send it to the machine. I/O devices are often divided into two categories −
- Block devices − A block device is one with which the driving force interacts by giving complete blocks of information. For instance, Hard disks, USB cameras, Disk-On-Key etc.
- Character devices − a personality device is one with which the driving force communicates by sending and receiving single characters (bytes, octets). for instance, serial ports, parallel ports, sound cards etc.
- Device Controllers - Device drivers are software modules that will be plugged into an OS to control a particular device. OS takes assistance from device drivers to manage every I/O device. The Device Controller works like an interface between a tool and a tool driver. I/O units such as Keyboard, mouse, printer, etc. generally holds an automatic component and an electronic component where the electronic component is named the device controller.
There is always a tool controller and a tool driver for every device to speak with the Operating Systems. a tool controller could also be ready to handle multiple devices. As an interface its main task is to convert the serial bit stream to the dam of bytes, perform error correction as necessary.
Any device connected to the pc is connected by a plug and socket, and therefore the socket is connected to a tool controller. Given is a portrait for attaching the CPU, memory, controllers, and I/O devices where CPU and device controllers all use a standard bus for communication.