CS3224 - 5. IO (three per page)

CS3224 - 5. IO (three per page) - Input/Output I/O hardware...

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

View Full Document Right Arrow Icon
1 1 Input/Output • I/O hardware basics • I/O software basics • Specific Devices •D i s k s •C l o c k s Character Character Character -oriented terminals oriented terminals oriented terminals 2 Range of I/O Hardware Some typical device, network, and data base rates 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
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 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. 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 2
3 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. 9 Programmed I/O Writing a string to the printer using programmed I/O
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 10 Interrupts Revisited How interrupts happens. Connections between devices and interrupt controller actually use interrupt lines on the bus rather than dedicated wires 11 Interrupt Driven I/O To print a string • Loop (bit-spin) checking to see if the 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 4
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 15 Principles of I/O Software Issues • Device independence
Background image of page 5

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

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

Page1 / 16

CS3224 - 5. IO (three per page) - Input/Output I/O hardware...

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

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