



































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The means of exchanging data between the external environment and the computer through input/output (I/O) modules. It explains the three categories of external devices, the International Reference Alphabet (IRA), and the different I/O techniques and commands. It also covers the design issues in implementing interrupt I/O and the characteristics of I/O channels. useful for students studying computer architecture and operating systems.
Typology: Slides
1 / 43
This page cannot be seen from the preview
Don't miss anything!




































Two major functions:
◼ Provide a means of exchanging data
between the external environment
and the computer
◼ Attach to the computer by a link to an
I/O module
◼ Peripheral device
◼ Human readable
◼ Machine readable
◼ Communication
◼ Associated with each character is a code
◼ Each character in this code is represented by a unique 7-bit binary code
◼ 128 different characters can be represented
◼ Printable
◼ Alphabetic, numeric, and special characters that can be printed on paper or displayed on a screen
◼ Control
◼ Have to do with controlling the printing or displaying of characters
◼ Example is carriage return
◼ Other control characters are concerned with communications procedures
◼ When the user depresses a key it generates an electronic signal that is interpreted by the transducer in the keyboard and translated into the bit pattern of the corresponding IRA code
◼ This bit pattern is transmitted to the I/O module in the computer
◼ On output, IRA code characters are transmitted to an external device from the I/O module
◼ The transducer interprets the code and sends the required electronic signals to the output device either to display the indicated character or perform the requested control function
International Reference Alphabet
(IRA)
Figure 7.3 Block Diagram of an I/O Module
I/O channel or I/O processor
I/O controller or Device controller
No Interrupts Use of Interrupts
I/O-to-memory transfer
through processor
Programmed I/O Interrupt-driven I/O
Direct I/O-to-memory
transfer
Direct memory access (DMA)
Issue Read command to I/O module
Read status of I/O module
Check status
Read word from I/O Module
Write word into memory
Done?
Next instruction (a) Programmed I/O
CPU I/O
CPU memory
I/O CPU
I/O CPU
Error condition
Ready Ready
Yes Yes
No
Not ready
Issue Read command to I/O module
Do something else
Read status Interrupt of I/O module
Check status
Read word from I/O Module
Write word into memory
Done?
Next instruction (b) Interrupt-driven I/O
CPU memory
Do something else
Interrupt
CPU DMA
DMA CPU
I/O CPU
Error condition
No
Issue Read block command to I/O module
Read status of DMA module
Next instruction
(c) Direct memory access
CPU I/O
I/O CPU
◼ Memory mapped I/O
◼ Large selection of memory access commands available
◼ Isolated I/O
◼ Limited set
The problem with programmed I/O is that the processor has to wait a long time for the I/O module to be ready for either reception or transmission of data
An alternative is for the processor to issue an I/O command to a module and then go on to do some other useful work
The I/O module will then interrupt the processor to request service when it is ready to exchange data with the processor
The processor executes the data transfer and resumes its former processing
Start
N + 1
Y + L
N
Y
Y
T
Return
User's Program
Main Memory
Processor
General Registers
Program Counter
Stack Pointer
N + 1
T – M
T – M
T
Control Stack
Interrupt Service Routine
User's Program
Interrupt Service Routine
(a) Interrupt occurs after instruction at location N (b) Return from interrupt
Start
N + 1
Y + L
N
Y
T
Return
Main Memory
Processor
General Registers
Program Counter
Stack Pointer
Y + L
T – M
T – M
T
Control Stack
N + 1
Start
N + 1
Y + L
N
Y
Y
T
Return
User's Program
Main Memory
Processor
General Registers
Program Counter
Stack Pointer
N + 1
T – M
T – M
T
Control Stack
Interrupt Service Routine
User's Program
Interrupt Service Routine
(a) Interrupt occurs after instruction at location N (b) Return from interrupt
Start
N + 1
Y + L
N
Y
T
Return
Main Memory
Processor
General Registers
Program Counter
Stack Pointer
Y + L
T – M
T – M
T
Control Stack
N + 1
1
2
3
5