COMPUTER ORGANISATION PPT ON IO TECHNIQUES By:- OM PRAKASH
I/O TECHNIQUE PROGRAMMED I/O CPU controls the entire process Can waste CPU time INTERRUPT DRIVEN I/O Processor issue command Device proceeds and leaves processor free DIRECT MEMORY ACCESS(DMA) INDEX -
Programmed I/O refers to data transfer initiated by a CPU under driver software control to access registers or memory on a device. The CPU issue a command then waits for I/O operations to be complete. CPU has direct control over I/O -sensing status -read/write commands -transferring data CPU waits for I/O module to complete operation Wastes CPU time PROGRAMMED I/O
PROGRAMMED I/O BASICALLY WORKS IN THIS WAY:- CPU request I/O operation I/O module performs operation I/O module sets status bits CPU checks the status bit periodically I/O module does not inform CPU directly I/O module does not interrupt CPU CPU may wait or come back later
Overcomes CPU waiting Avoids repeated checking of device by CPU I/O module interrupt when ready INTERRUPT DRIVEN I/O
CPU issues read command I/O module gets data from peripheral while CPU does the other work I/O module interrupts CPU CPU request data I/O module transfer data INTERRUPT DRIVEN I/O BASIC OPERATION
DMA allows device to communicate directly with memory without passing data through the CPU. During DMA ,the CPU is idle and has no control of the memory buses. DIRECT MEMORY ACCESS DMA access needs a special hardware called DMA CONTROLLER that manage the data transfer and arbitrates access to the system bus. DMA controller needs the usual circuit of an interface to communicate with the CPU and I/O device
The figure shows the block diagram of a typical DMA controller. The DMA controller has three registers:- 1.Word counter register-it holds the numbers of words to be transferred. 2.Control register-It specifies the mode of transfer. 3.Address register-It contain an address to specify the desired location in memory.