- Hello everyone, after discussing file system in our previous post, we are moving on to our next topic in operating system which is I/O Hardware.
- Computer uses different types of devices to perform operations.
- These devices can be categories as storage devices (disks, tapes), transmission devices(network card, modem), and human-interface devices (keyboard, mouse)
- A device communicates with computer system by sending signals over a cable or through air.
- The device communicates with computer via connection point or port.
- Devices may be connected through bus.
A bus is a set of wires which is used to transfer data from and to the I/O devices and memory.
- When device A has a cable that plugs into device B, and device B is plugged into device C, and device is connected into a computer port then such arrangement is called a Daisy chain.
- Buses vary in their signaling methods, speed, throughput, and connection methods.
- Examples of widely used common buses are PCI and SCSI bus.
- The PCI bus (Peripheral Component Interconnect) connects processor-memory subsystem to the fast devices.
- The expansion bus connects slow devices such as keyboard and serial and USB port
- The disks are connected together on SCSI bus plugged into a SCSI controller.
A controller is a collection of electronics that can operate a port, a bus or a device.
- A serial-port controller is a simple device controller. It is a single chip that controls the signals on the wires of a serial port.
- A SCSI bus controller is a complex so normally it is implemented as a separate circuit board.
- It contains a processor, microcode, and private memory to process SCSI protocol messages.
- Some devices have their own in-built controllers.( such as disk drive that contains circuit board at one side)
- It has microcode and a processor to perform many task such as bad-sector mapping, buffering, and catching.
- Controller has one or more registers for data and control signals.
- The processor communicates with the controller by reading and writing bit value in these registers
- The graphics controller has a large memory-area to store screen contents.
- The process sends output to the screen by writing into this memory-area.
- An I/O port normally contains four registers:
Data-in register
read by the host to get input.
Data-out registers
Which is written by the host to send output.
Status register
It indicates status such as current command has completed, a byte is available to be read from the data-in register or a device error is generated.
Control register
It can be written by the host to start a command or to change the mode of a device. For example enabling parity checking, speed supported by the port.