Unit 3: I/O organization
Computer System Architecture notes · PTU syllabus (BSIT301/BSBC204)
On this page
Unit summary
Input/output organisation connects the CPU and memory with the outside world. This unit covers the I/O interface unit, port types, the I/O bus, isolated vs memory-mapped I/O, programmed I/O, interrupt-initiated I/O, the DMA controller and I/O processors, synchronous and asynchronous data transfer, and strobe and handshaking.
After this unit you can
- Explain the I/O interface, ports and I/O bus
- Compare isolated and memory-mapped I/O
- Compare programmed, interrupt-initiated and DMA transfer
- Explain synchronous and asynchronous transfer, strobe and handshaking
PTU syllabus topics
- I/O interface unit
- port types
- I/O bus
- isolated vs memory-mapped I/O
- programmed I/O
- interrupt-initiated I/O
- DMA controller and IOP
- synchronous and asynchronous data transfer
- strobe and handshaking
Topic 1
The I/O interface unit
- Need: peripherals differ in speed, data formats and signals from the CPU; an interface resolves these differences.
- Functions: decode device addresses, buffer data, convert formats, provide status and control signals, handle interrupts.
- Ports: data port (data in and out), status port (device status), control port (commands); serial and parallel ports.
Example
Why interfaces are needed: a printer works far slower than the CPU and uses different signals. Its interface buffers data, converts formats and tells the CPU through status bits when the printer is ready for the next character.
Exam tip
Interface resolves differences in speed, data format, signals and operating modes.
Topic 2
The I/O bus
- I/O bus: data lines, address lines and control lines connecting the processor to interfaces; each interface checks the address to respond.
- I/O commands: control, status, data output, data input.
Example
Addressing a device: the CPU places the device address of the printer on the address lines and a 'write' command on the control lines. Only the printer interface recognises its address and accepts the data from the data lines.
Exam tip
Each interface has its own address decoder to recognise its device address.
Topic 3
Isolated vs memory-mapped I/O
Address space
Separate for I/O and memory
Shared — I/O registers have memory addresses
Instructions
Special IN and OUT instructions
Ordinary memory instructions
Memory available
Full memory space
Reduced by I/O addresses
Example
Intel x86 port I/O
ARM processors, most modern systems
Example
Two approaches: in isolated I/O (as in x86), special IN and OUT instructions access device ports. In memory-mapped I/O (common in ARM), a device register appears at an ordinary memory address, so normal LOAD and STORE instructions control the device.
Exam tip
Memory-mapped I/O reduces the memory address space available but simplifies programming.
Topic 4
Modes of data transfer
Programmed I/O
CPU repeatedly checks device status (polling)
Wastes CPU time
Interrupt-initiated I/O
Device interrupts CPU when ready
Overhead for each transfer
Direct memory access (DMA)
DMA controller transfers blocks directly between memory and device; CPU only starts and ends
Needs extra hardware; bus contention
- DMA operation: CPU programs the DMA controller (address, count, direction); controller requests the bus (bus request), CPU grants it (bus grant); transfer in burst or cycle-stealing mode; interrupt at completion.
- I/O processor (IOP): a processor dedicated to I/O tasks, executing its own I/O programs — relieves the CPU further.
Example
Choosing a mode: reading one key press suits interrupt-driven I/O. Copying a large file from disk to memory uses DMA — the DMA controller moves the whole block while the CPU does other work, interrupting the CPU only when the transfer is finished.
Exam tip
Programmed I/O wastes CPU time; interrupts are better; DMA is best for large blocks.
Topic 5
Synchronous and asynchronous data transfer
Asynchronous transfer uses strobe or handshaking signals to coordinate the units. Handshaking is more reliable because each step is acknowledged.
- Synchronous: sender and receiver share a common clock.
- Asynchronous: units have separate clocks; timing signals coordinate transfer.
Signals
One control line (strobe) from source or destination
Two lines — data valid and data accepted
Confirmation
No acknowledgement
Each step acknowledged
Reliability
Lower
Higher
- Asynchronous serial transfer: start bit, data bits, parity bit, stop bits — used in UART communication.
Example
Two-wire handshaking: the source places data on the bus and raises 'data valid'; the destination reads it and raises 'data accepted'; the source then removes the data and lowers 'data valid', and the destination lowers 'data accepted' — ready for the next byte.
Exam tip
Draw the handshaking timing diagram — it is often asked.
Key terms
- I/O interface
- Hardware linking CPU and a peripheral
- Memory-mapped I/O
- I/O registers accessed as memory locations
- Polling
- CPU repeatedly checking device status
- DMA
- Direct memory access without CPU involvement in each transfer
- Handshaking
- Two-way control signalling for data transfer
Quick revision
- Interface functions; data, status, control ports; I/O bus.
- Isolated vs memory-mapped I/O.
- Programmed, interrupt-driven, DMA; burst and cycle stealing; IOP.
- Synchronous vs asynchronous; strobe vs handshaking; serial frame.
Important exam questions
Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).
Short-answer questions
- Q1.Why is an I/O interface needed?
- Q2.Distinguish isolated and memory-mapped I/O.
- Q3.What is polling?
- Q4.What is cycle stealing in DMA?
- Q5.What is an IOP?
- Q6.Distinguish strobe and handshaking.
Long-answer questions
- Q1.Explain the I/O interface, ports and I/O bus.
- Q2.Compare isolated and memory-mapped I/O.
- Q3.Explain programmed I/O, interrupt-initiated I/O and DMA.
- Q4.Explain asynchronous data transfer using strobe and handshaking.
Stuck on this unit?
Message SBS on WhatsApp for help with Computer System Architecture, or to ask about studying B.Sc IT at Synetic.
