Input and output
Introduction
In this blog I will discuss on input/output procedures&devices .External device are not generally connected directly int the bus structure of the computer.I/O module is an interface for the external devices (peripherals) to CPU and memory.
Input device
• Mouse
• ScanKeyboardner
• CD-Rom
• Game Controller
• Monitor
• Printers
• Disk Drive
• Floppy Drive
• CDRW-Rom
• Speakers
• Modem
• NIC
• MONITOR
A model i/o configuration
Function of I/O modules
• Control and Timing.
• CPU Communicating.
• Device Communication.
• Data Buffering.
• Error Detection.
Control and Timing
• CPU asks I/O module to check the status of attached device.
• I/O module tells the status.
• CPU requests for data transfer to I/O module if device is ready.
• I/O module gathers the data and transfers to the CPU.
Cpu Communication
• Command Decoding : Like read/write seek etc. Data
Exchange between CPU and Module. Status reporting to CPU, since
peripherals are slow. Address recognition for the devices connected
to it.
Device Communication
• Device Communication : This may involves command, status
information and data transfer.
Data Buffering
• Data Buffering : Essential function to overcome speed mismatch.
Error Detection.
• Error Detection : Like paper jam, bad data etc.
TECHNIQUES OF I/O
• Programmed I/O : The CPU issues a command then waits for I/O
operations to be complete. The CPU is faster than the I/O module
then method is wasteful.
• Interrupt Driven I/O : The CPU issues commands then proceeds
with its normal work until interrupted by I/O device on completion
of its work.
• DMA : In this CPU and I/O Module exchange data without
involvement of CPU.
• Memory mapped I/O : Memory and I/O are treated as memory
only. It means no signal like IO/M.
Isolated I/O : Address space of memory and I/O is isolated.
It uses IO/M signal
Interrupts l/0
• CPU interrupt request line triggered by I/O devices
• Interrupt handler receives interrupt
• Maskable to ignore or delay some interrupts
• Interrupt vector to dispatch interrupt to correct handler
Based on priorty
Some unmaskable
• Interrupt mechanism also used for exceptions
Interrupt Processing
Interrupt driven I/O cycle
1) CPU directly controls a peripheral device.
2) Use controller or i/o module.
3) Implement interrupts.
4) i/o module is given direct access to memory via DMA
5) i/o module is enhanced to become a processor
6) i/o module has a local memory of its own
Direct Memory Access
• Special Purpose Processor: DMA controller
• Free CPU from pure data transfer tasks
• DMA access: Pointer to source, destination and size of data issued to start transfer
• Processor writes the data DMA access data and continuous working
• Handshake protocol
• DMA request and DMA acknowledge
• DMA controllers are standard components in PCs
• Bus-mastering I/O hardware contain their own DMA hardware
DMA function
• Additional modul (hardware) on bus
• DMA controller takes over from CPU for I/O
DMA Transfer
Serial
o In band signaling
o Bit oriented
o Bit/byte word translation
Parallel
o Byte word oriented
o Out of band signaling
o IDE, SCSI
SERIAL TRANSFER
• Asynchronous Clocking
o Master clock the transfer
o Slave derive clock from master
• Synchronous clocking
o Independent clocking
o Verification by synchronization pattern
PARALLEL TRANSFER
• Data transfer
o Read sector
o Write sector
• Control
o Disk seek
• Transfer Integrity
o Transfer parity
o Data encoding
0 comments:
Post a Comment