Input / Output Devices - BunksAllowed

BunksAllowed is an effort to facilitate Self Learning process through the provision of quality tutorials.

Community

Input / Output Devices

Share This

Controlling all of the computer's I/O (Input/Output) devices is one of the primary responsibilities of an operating system. It must send commands to the devices, handle mistakes, and take care of interruptions.

Additionally, it must offer a user-friendly interface between the devices and the rest of the system. 

I/O devices can be roughly divided into two categories: block devices and character devices

A block device is one that stores data in fixed-size, uniquely addressed blocks. The typical block size falls between 512 and 32,768 bytes. The ability to read or write each block independently of every block is a block device's key feature.

Disks are the most common block devices. 

A character device delivers or accepts a stream of characters, without regard to any block structure. It is not addressable and does not have any seek operation. 

Printers, network interfaces, mice (for pointing), rats (for psychology lab experiments), and most other devices that are not disk-like can be seen as character devices.

I/O devices cover a vast range of speeds, which puts considerable pressure on the software to perform well over many orders of magnitude in data rates.

I/O units typically consist of a mechanical component and an electronic component. 

In order to give a more modular and universal design, it is frequently possible to split the two parts. The device controller or adapter is the name of the electronic component. It frequently takes the shape of a printed circuit card that may be inserted into an expansion slot on personal computers. The device itself is the mechanical part.


The interface between the controller and the device is often a very low-level interface. 

For instance, a drive could be formatted with 256 tracks of 512 bytes each. However, what really exits the drive is a serial bit stream, which includes a preamble, the 4096 bits of a sector, and a checksum (commonly known as an error-correcting code, or ECC). The preamble, which comprises the cylinder and sector numbers, the sector size, comparable data, and synchronization information, is written when the disk is formatted.

It is the controller's responsibility to translate the serial bit stream into a block of bytes and carry out any necessary error correction. Typically, a buffer inside the controller is where the block of bytes is first pieced together bit by bit. The block can then be copied to main memory after its checksum has been validated and it has been determined to be error-free.

Each controller has a few registers that it uses to interact with the CPU. By entering commands into these registers, the operating system can tell the device how to deliver data, accept data, switch on or off, and do other operations. By reading from these registers, the operating system can learn about the device's status, whether it is prepared to accept a new command, and other details.




Happy Exploring!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.