IO systems
IO systems
I/O Systems
S.Rajarajan
SASTRA
• The two main jobs of a computer are I/O and processing.
• The role of the operating system in computer I/O is to
manage and control I/O operations and I/O devices.
• I/O management is a major component of operating system
design and operation
– Important aspect of computer operation
– I/O devices vary greatly
– Various methods used to control them
– Performance management
– New types of devices introduced frequently
• The role of the operating system in computer I/O is to
manage and control I/O operations and I/O devices.
Overview
• The control of devices connected to the computer is a major
concern of operating-system designers.
• Because I/O devices vary so widely in their function and
speed.
• Varied methods are needed to control them.
• These methods form the I/O subsystem of the kernel, which
separates the rest of the kernel from the complexities of
managing I/O devices.
Device Drivers
• To encapsulate the details and oddities of different devices,
the kernel of an operating system is structured to use
device-driver modules.
• Present a uniform device access interface to the I/O
subsystem, much as system calls provide a standard
interface between the application and the operating system
I/O Hardware
• Computers operate a great many kinds of devices.
• Most fit into the general categories of
– storage devices (disks, tapes)
– transmission devices (network connections, Bluetooth),
– and human-interface devices (screen, keyboard, mouse, audio in
and out).
• Despite the variety of I/O devices, though, we need only a
few concepts to understand how the devices are attached
and how the software can control the hardware.
• A device communicates with a computer system by sending signals
over a cable or even wireless
• Common ways for transmission of signals from I/O devices interface with
computer
– Port – The device communicates with the machine via a connection point,
or port—for example, a serial port
– Bus - If devices share a common set of wires, the connection is called a bus.
A bus is a set of wires and a rigidly defined protocol that specifies a set of
messages that can be sent on the wires.
– daisy chain- When device A has a cable that plugs into device B, and device
B has a cable that plugs into device C, and device C plugs into a port on the
computer, this arrangement is called a daisy chain. A daisy chain usually
operates as a bus
– Controller (host adapter) – is a collection of electronics that can operate a
port, a bus, or a device.
Bus
• If devices share a common set of wires, the connection is
called a bus.
• A bus is a set of wires and a rigidly defined protocol that
specifies a set of messages that can be sent on the wires.
• In terms of the electronics, the messages are conveyed by
patterns of electrical voltages applied to the wires with
defined timings.
Daisy chain
• When device A has a cable that plugs into device B, and
device B has a cable that plugs into device C, and device C
plugs into a port on the computer, this arrangement is
called a daisy chain.
• Buses are used widely in computer architecture and vary
in their signaling methods, speed, throughput, and
connection methods
PCI Bus architecture
PCI Bus
• A PCI bus (the common PC system bus) connects the processor–
memory subsystem to fast devices, and an expansion bus
connects relatively slow devices, such as the keyboard and
serial and USB ports.
• In the upper-right portion of the figure, four disks are connected
together on a Small Computer System Interface (SCSI) bus
plugged into a SCSI controller.
• Other common buses used to interconnect main parts of a
computer include PCI Express (PCIe).
• HyperTransport bus has throughput of up to 25 GB per second.
Controller
• A controller is a collection of electronics that can operate a
port or a bus , or a device
• A serial-port controller is a simple device controller. It is a single chip (or
portion of a chip) intergraded in the computer that controls the signals
on the wires of a serial port
• By contrast, a SCSI bus controller is not simple. Because the SCSI protocol
is complex, the SCSI bus controller is often implemented as a separate
circuit board (or a host adapter) that plugs into the computer. Contains
processor, microcode, private memory, bus controller, etc
How can the processor give commands and data to a device
controller to accomplish an I/O transfer?