Sunteți pe pagina 1din 3

Device Communication

involves commands, status


information and data.

I/O Module Processor Communication


Function command decoding in I/O module,
Data Buffering data exchange through data bus, status
the data are buffered in the I/O reporting about peripherals, and CPU
module and then sent to the assigning unique address for each I/O
peripheral device at its data module.
rate.

Error Detection
Control & Timing
for reporting errors to the processor.
requirement is needed to
 Mechanical and electrical malfunction (ex:
coordinate flow of traffic
paper jam, bad disk sector)
between external devices
 Unintentional changes to bit pattern during
and internal resources.
transmission

CPU checks I/O module device Variations for output, DMA, etc.
status

I/O module returns status I/O module transfers data to CPU

If ready, CPU requests data transfer I/O module gets data from device
Addressing I/O Devices

Memory mapped I/O Isolated I/O


 Devices and memory  Separate address spaces
share an address space  Need I/O or memory
 I/O looks just like select lines
memory read/write  Special commands for
 No special commands for I/O
I/O
i)CPU has direct control over i)Overcomes CPU i)Interrupt driven and
I/O waiting programmed I/O
- Sensing status ii)No repeated CPU require active CPU
- Read/write commands checking of device intervention
- Transferring data iii)I/O module -Transfer rate is
ii)CPU while waiting for I/O
interrupts when limited
module to complete operation,
ready -CPU is tied up
CPU will periodically checks
for I/O to see if it needs CPU’s Basic operation
service -CPU issues read Advantage
iii)Wastes CPU time command Large amounts of data
iv)Results in inefficient CPU -I/O module gets can be transferred
usage data from between memory and
v)Therefore programmed I/O peripheral whilst the peripheral w/o
ideally suited for lower CPU does other severely impacting
performance.
work CPU performance.
vi)Programmed I/O is simplest
-I/O module
method to implement and
requires a relatively small interrupts CPU Operation
amount of special I/O -CPU requests data i)CPU tells DMA
hardware. -I/O module controller:-
Details transfers data -Read/Write
-CPU requests I/O operation -Device address
-I/O module performs -Starting address of
operation memory block for data
-I/O module sets status bits
-Amount of data to be
-CPU checks status bits
periodically-I/O module does transferred
not inform CPU directly ii)CPU carries on with
-I/O module does not other work
interrupt CPU iii)DMA controller
-CPU may wait or come back deals with transfer
later iv)DMA controller
sends interrupt when
finished

S-ar putea să vă placă și