1 / 42

Lecture 12 I/O System

Lecture 12 I/O System. xlanchen@05/13/2005. Contents. I/O System Components I/O Data Structures Driver Loading, Initialization, and Installation I/O Processing. I/O System Components. I/O manager. The flow of a typical I/O request. I/O Manager.

jereni
Download Presentation

Lecture 12 I/O System

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. Lecture 12 I/O System xlanchen@05/13/2005

  2. Contents • I/O System Components • I/O Data Structures • Driver Loading, Initialization, and Installation • I/O Processing Understanding the Inside of Windows 2000

  3. I/O System Components I/O manager Understanding the Inside of Windows 2000

  4. The flow of a typical I/O request Understanding the Inside of Windows 2000

  5. I/O Manager • The I/O manager defines the orderly framework, or model, within which I/O requests are delivered to device drivers. • Packet driven • I/O request packet (IRP) • Flexible I/O services Understanding the Inside of Windows 2000

  6. Device Drivers • Types • File system drivers • Windows 2000 drivers • Legacy drivers • display drivers • WDM drivers • Bus drivers • Function drivers • Filter drivers Understanding the Inside of Windows 2000

  7. user-mode drivers • Virtual device drivers (VDDs) • Win32 subsystem printer drivers • Driver components • Class drivers • Port drivers • Miniport drivers Understanding the Inside of Windows 2000

  8. Layering of a FSD and a disk driver Understanding the Inside of Windows 2000

  9. Adding a layered driver Understanding the Inside of Windows 2000

  10. Structure of a Drive • The I/O system drives the execution of device drivers • Primary device driver routines Understanding the Inside of Windows 2000

  11. Plug and Play (PnP) Manager Understanding the Inside of Windows 2000

  12. Requirement hardware must comply with ACPI specification The six system power states See table 9-2 Power Manager Understanding the Inside of Windows 2000

  13. System power-state transitions Sleeping waking Understanding the Inside of Windows 2000

  14. I/O Data Structures • File Objects • Driver Objects and Device Objects • I/O Request Packets • I/O Completion Ports Understanding the Inside of Windows 2000

  15. File Objects • File Object Attributes • Filename • Current byte offset • Share modes • Open mode flags • Pointer to device object • Pointer to the volume parameter block (VPB) • Pointer to section object pointers • Pointer to private cache map Understanding the Inside of Windows 2000

  16. Opening a file object Understanding the Inside of Windows 2000

  17. Driver Objects and Device Objects • A driver object represents an individual driver in the system. • A device object represents a physical or logical device on the system and describes its characteristics Understanding the Inside of Windows 2000

  18. The driver object Understanding the Inside of Windows 2000

  19. I/O Request Packets • IRP is where the I/O system stores information it needs to process an I/O request. Understanding the Inside of Windows 2000

  20. Data structures involved in a single-layered driver I/O request Understanding the Inside of Windows 2000

  21. IRP Stack Locations • IRP • a fixed header • one or more stack locations • IRP Buffer Management • Buffered I/O • Direct I/O • Neither I/O Understanding the Inside of Windows 2000

  22. I/O Completion Ports • The IoCompletion Object • Applications use the IoCompletion executive object, which is exported to Win32 as a completion port, as the focal point for the completion of I/O associated with multiple file handles. Understanding the Inside of Windows 2000

  23. I/O completion port operation Understanding the Inside of Windows 2000

  24. Driver Loading, Initialization, and Installation • Explicit loading • Enumeration-based loading Understanding the Inside of Windows 2000

  25. The Start Value • boot-start (0) • system-start (1) • auto-start (2) • demand-start (3) Understanding the Inside of Windows 2000

  26. Device Enumeration • PnP manager • primary bus driver • device tree Understanding the Inside of Windows 2000

  27. Example device tree Understanding the Inside of Windows 2000

  28. Devnodes Understanding the Inside of Windows 2000

  29. Driver Installation Understanding the Inside of Windows 2000

  30. I/O Processing • Types of I/O • Synchronous I/O and Asynchronous I/O • Fast I/O • Mapped File I/O and File Caching • Scatter/Gather I/O Understanding the Inside of Windows 2000

  31. Control flow for an I/O operation Understanding the Inside of Windows 2000

  32. I/O Request to a Single-Layered Driver Understanding the Inside of Windows 2000

  33. Servicing an Interrupt Phrase 1 Understanding the Inside of Windows 2000

  34. Phrase 2 Understanding the Inside of Windows 2000

  35. Completing an I/O Request Phrase 1 Understanding the Inside of Windows 2000

  36. Phrase 2 Understanding the Inside of Windows 2000

  37. I/O Requests to Layered Drivers Understanding the Inside of Windows 2000

  38. Completing a layered I/O request Understanding the Inside of Windows 2000

  39. Queuing associated IRPs Understanding the Inside of Windows 2000

  40. Completing associated IRPs Understanding the Inside of Windows 2000

  41. I/O Completion Port Operation Understanding the Inside of Windows 2000

  42. Synchronization Understanding the Inside of Windows 2000

More Related