CS3224 - 5. IO

CS3224 - 5. IO - Input/Output 1 Range of I/O Hardware Some...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
1 1 Input/Output 2 Range of I/O Hardware Some typical device, network, and data base rates
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 3 How do we talk to Hardware? Through Device Controllers • I/O devices have components: mechanical component electronic component • The electronic component is the device controller may be able to handle multiple devices (e.g., IDE handles two, SCSI handles 8) • Controller's tasks (examples) interpret instructions from the cpu, translating them into mechanical steps. convert data between serial bit stream for the hardware and blocks of bytes for the software. perform error correction as necessary on the data read from the device. make data available to main memory 4 But how do we talk to the Controller? • Each controller has one or more “ports”. • A port is an “address” that we can read from or write to. • We read from the port (or write to it) by putting the port’s address on the bus. • Every device (including memory) can look at the bus. If you’re a device controller and you see your address on the bus, then you respond to the corresponding command.
Background image of page 2
3 5 How does a program address a port? • Separate I/O space • Memory-mapped I/O • Hybrid 6 Memory-Mapped I/O Issues (a) A single-bus architecture (b) A dual-bus memory architecture
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 7 Common Layout 8 Programmed I/O To print a string • Loop (bit-spin) checking to see if the device is ready. This requires reading the device’s status port. • Write a character to the output port. • Repeat until all characters have been written.
Background image of page 4
5 9 Programmed I/O Writing a string to the printer using programmed I/O 10 Interrupts Revisited How interrupts happens. Connections between devices and interrupt controller actually use interrupt lines on the bus rather than dedicated wires
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 11 Interrupt Driven I/O To print a string • When device is ready: Write a character to the output port. Go do something else. Probably involving a context switch. • Receive an interrupt because the printer finished printing. • Repeat until all characters have been written. 12 Interrupt-Driven I/O • Writing a string to the printer using interrupt-driven I/O Code executed when print system call is made Interrupt service procedure
Background image of page 6
7 13 Direct Memory Access (DMA) Operation of a DMA transfer 14 I/O Using DMA Printing a string using DMA a) code executed when the print system call is made b) interrupt service procedure
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 15 Principles of I/O Software Issues • Device independence • Naming • Error handling • Synchronous vs. asynchronous transfers • Buffering • Sharable vs. dedicated devices 16 I/O Software Layers Layers of the I/O Software System
Background image of page 8
9 17 Interrupt Handlers
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 24

CS3224 - 5. IO - Input/Output 1 Range of I/O Hardware Some...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online