Please enable JavaScript.
Coggle requires JavaScript to display documents.
UNDERSTAND I/O IN COMPUTER SYSTEM - Coggle Diagram
UNDERSTAND I/O IN COMPUTER SYSTEM
LEARNING OUTCOMES
:star: By the end of this topic, you should be able to:
:red_flag: Define I/O Module
:red_flag: Draw the I/O Module diagram
:red_flag: List I/O devices
:red_flag: Describe the I/O bus and interface modules
I/O MODULE
:star: The term I/O is used to describe any program,
operation or device that transfers data to or
from a computer and to or from a peripheral
device.
:star: Every transfer is an output from one device and
an input into another
:star: Devices such as keyboards and mouses are
input-only devices while devices such as printers
are output-only. A writable CD-ROM is both an
input and an output device.
:star: Acts as an interface with the CPU and memory
via the system bus or central switch.
:star: Acts as an interface with one or more
peripheral devices by tailored data links.
INPUT/OUTPUT DATA TRANSFER
Asynchronous Serial Transfer
:star: Asynchronous serial transmission is character oriented.
:star: Each character transmitter consists of a start bit,
character bits, and stop bits.
:star: The first bit is called the start bit. It is always a 0 and is
used to indicate the beginning of a character.
:star: The last bit called the stop bit is always a 1. In
asynchronous transmission, binary information is sent
only when it is available and the line remains idle when
there is no information to be transmitted.
Asynchronous Communication Interface
:star: Is the transmission of data without the use of an
external clock signal, where data can be
transmitted continuously rather than in a steady
stream.
:star: The most significant aspect of asynchronous
communications is variable bit rate, or that the
transmitter and receiver clock generators do not
have to be exactly synchronized.
CHARACTERISTIC OF ISOLATED AND MEMORY MAPPED I/O
:star: Isolated I/O uses a special class of CPU
instructions specifically for performing I/O. This is
generally found on Intel microprocessors,
specifically the IN and OUT instructions which can
read and write one to four bytes (outb, outw,
outl) to an I/O device.
:star: The processor and the I/O device have different
memory located to each other.
:star: Memory mapped I/O is one where
the processor and the I/O device share the same
memory location(memory).
TRANSFER MODE
:star: Programmed I/O
:star: Interrupt-Initiated I/O
:star: Direct Memory Access
PROGRAMMED I/O
:star: Is the method of transferring data between
the CPU and a peripheral such as a network
adapter or an ATA storage device.
:star: In general, programmed I/O happens when
software running on the CPU uses instructions
that access I/O address space to perform data
transfers to or from an I/O device.
:star: The best known example of a PC device that
uses programmed I/O is the ATA interface.
:star: Programmed I/O refers to using input and
output instructions to transfer data between
memory and the registers on a peripheral
interface.
:star: Data are exchanged between the CPU and the I/O
module.
:star: The CPU executes a program that gives it direct
control of the I/O operation, including sensing
device status, sending a read or write command
and transferring data.
:star: When CPU issues a command to I/O module, it
must wait until I/O operation is complete.
:star: If the CPU is faster than I/O module, there is
wastage of CPU time.
:star: Advantage: – Simple to implement
:star: Disadvantage: – CPU is tied up for the duration of the transfer
while doing a relatively simple task
INTERRUPT-INITIANTED I/O
:star: Overcomes the processor having to wait long
periods of time for I/O modules.
:star: The processor does not have to repeatedly
check the I/O module status.
Summary:
:star: Overcomes CPU waiting
:star: No repeated CPU checking of device
:star: I/O module interrupts when ready
DIRECT MEMORY ACCESS
:star: Direct Memory Access is a method of
transferring data between peripherals and
memory without using the CPU.
:star: Sometimes, CPU may not be fast enough to
keep up with the peripheral.
:star: In this case a special-purpose processor called
a DMA controller (DMAC) can be used to
transfer data between memory and I/O
devices.
DIRECT MEMORY ACCESS CONTROLLER [DMAC]
:star: The DMA controller periodically takes over
control of the system bus from the CPU.
:star: DMAC generates address, data and control
signals to transfer data between memory and
I/O devices.
DIRECT MEMORY ACCESS [DMA]
:star: For high-bandwidth devices (like disks) interrupt-driven
I/O would consume a lot of processor cycles
:star: DMA – the I/O controller has the ability to transfer data
directly to/from the memory without involving the
processor
:red_flag: The processor initiates the DMA transfer by supplying the I/O
device address, the operation to be performed, the memory
address destination/source, the number of bytes to transfer
:red_flag: The I/O DMA controller manages the entire transfer (possibly
thousand of bytes in length), arbitrating for the bus
:red_flag: When the DMA transfer is complete, the I/O controller
interrupts the processor to let it know that the transfer is
complete
:star: There may be multiple DMA devices in one system
– Processor and I/O controllers contend for bus cycles and for
memory