1 / 17

ITFN 2601 Introduction to Operating Systems

ITFN 2601 Introduction to Operating Systems. Lecture 19 Input/Output Device Drivers. Agenda. I/O Hardware Memory-Mapped & DMA I/O Software Principles Programmed, Interrupt-based, & DMA I/O Device Drivers Device Independent I/O. I/O Hardware. Block devices

topaz
Download Presentation

ITFN 2601 Introduction to Operating Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ITFN 2601Introduction to Operating Systems Lecture 19 Input/OutputDevice Drivers

  2. Agenda • I/O Hardware • Memory-Mapped & DMA • I/O Software Principles • Programmed, Interrupt-based, & DMA I/O • Device Drivers • Device Independent I/O

  3. I/O Hardware • Block devices • Stores info in fixed-size blocks • Each independent & has own address • Ex. Drives • Character Devices • Stream-based • Ex. Printers, NICs, & mice

  4. Various Data Rates

  5. Device Controllers • Controls the device • Establishes a standard (IDE, SCSI, etc.) • Sits between the bus & device

  6. Memory-Mapped I/O • CPU writes to registers on the controller • CPU can also write to data buffer on controller (ex. video RAM) • Memory chunk in main RAM assigned to corresponding space on controller • Write to memory chunk : this writes to controller • Must be able to selectively disable cache!

  7. “Listening In On” Memory-Mapped I/O All I/O controllerslisten on main bus Multi-bus systems requiresnooping or address filtering

  8. DMA (Direct Memory Access) • Without DMA • WithDMA

  9. I/O Software Principles • Device Independence • Uniform Naming • Error Handling • Synch vs. Asynch transfers • Buffering • Dedicated vs. Sharable resource/device

  10. Programmed I/O Disadvantage – ties up CPU

  11. Interrupt-Driven I/O • Sending multiple blocks/chunks of data to device • Why not do something while device processes request • Let the device generate an interrupt when request complete – then resume with next block/chunk • Downside – too many interrupts!

  12. DMA-based I/O • Let DMA handle the I/O transaction • Reduces need for interrupts • Downsides: • DMA controller is slower than CPU • CPU might be idle anyway 

  13. Device Drivers • Code that provides an API to controller • Allows OS to access controller’s registers, memory buffer, etc. • Must conform to OS standard for block or character devices

  14. Device Driver Location

  15. Device Independent I/O • Uniform Interface for Drivers • OS to communicate w/out “hacking OS” each time a device is added

  16. Device Independent I/O • Buffering • Allow device to read/write data w/out having to flood process w/ interrupts

More Related