What is Input/Output (I/O)?
Any transfer of information between the computer and the external world.
What are the basic ways to transfer information between the computer and external devices
Programmed I/O
Interrupts
Direct memory access
How are I/O devices controlled
Busy waiting
Polling
Interrupts
How is data transfer managed
Memory mapping
Cycle stealing
Buffering
In the von Neumann model, what counts as I/O?
Any transfer beyond CPU and main memory.
Why is I/O challenging?
Devices vary in speed, format, and data volume, and are slower than CPU/RAM.
What are the five functions of an I/O module?
Control & timing
Processor communication
Device communication
Data buffering
Error detection.
What is the purpose of data buffering?
To balance speed differences between CPU/memory and devices.
What are the 3 techniques for I/O operations
Programmed I/O
Interrupt-driven I/O
Direct memory access
What is programmed I/O?
CPU waits for device to finish I/O before continuing.
Main disadvantage of programmed I/O?
If the processor is faster than the I/O module this is wasteful of processor time
What is interrupt‑driven I/O?
Processor sends an I/O request, then continues doing other work.
When the device finishes, it sends an interrupt to tell the CPU, which pauses, handles it, then carries on.
The parent tells the kid to do a chore, then carries on with their own work. When the kid finishes, they come back and interrupt the parent, who pauses, deals with them, then continues working.
What is DMA?
The I/O module and main memory exchange data directly without processor involvement
Which I/O technique has no interrupts and has I/O to memory transfer through processor
Programmed I/O
Which I/O technique uses interrupts and has I/O to memory transfer through processor
Interrupt driven I/O
Which I/O technique uses interrupts and has direct I/O to memory transfer
Direct memory access
What is the first step in controlling I/O devices
A stored instruction is fetched to the IR in the CPU and turns out, upon decoding, to be an I/O operation.
What happens after an I/O instruction is decoded?
An instruction from the control unit to the I/O control unit causes the I/O control unit to send signals to the device to set it into action.
What must happen after the device is set into action?
Data will need to be transferred to the device (a write) or from the device (a read).
Where is the data placed during I/O transfers?
A data register.
What must the I/O instructions be structured and coded into a bit pattern with 3 parts describe
An I/O operation code
The direction of transfer
The address of the device
Where is I/O data placed in multiple device control?
I/O data is placed on a common I/O data bus.
Where is address information placed in multiple device control?
can also be placed on a common I/O address bus.
Whats the main advantages of having a shared I/O bus
Simplicity and flexibility - a single I/O control system with a single connection to the CPU.