Presentation is loading. Please wait.

Presentation is loading. Please wait.

计算机系 信息处理实验室 Lecture 12 I/O System

Similar presentations


Presentation on theme: "计算机系 信息处理实验室 Lecture 12 I/O System"— Presentation transcript:

1 计算机系 信息处理实验室 Lecture 12 I/O System xlanchen@05/13/2005

2 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 2 Contents I/O System Components I/O Data Structures Driver Loading, Initialization, and Installation I/O Processing

3 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 3 I/O System Components I/O manager

4 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 4 The flow of a typical I/O request

5 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding 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

6 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding 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

7 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding 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

8 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 8 Layering of a FSD and a disk driver

9 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 9 Adding a layered driver

10 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 10 Structure of a Drive The I/O system drives the execution of device drivers Primary device driver routines

11 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 11 Plug and Play (PnP) Manager

12 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 12 Power Manager Requirement hardware must comply with ACPI specification The six system power states See table 9-2table 9-2

13 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 13 System power-state transitions Sleeping waking

14 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding 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

15 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding 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

16 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 16 Opening a file object

17 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding 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

18 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 18 The driver object

19 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding 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.

20 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 20 Data structures involved in a single- layered driver I/O request

21 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding 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

22 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding 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.

23 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 23 I/O completion port operation

24 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 24 Driver Loading, Initialization, and Installation Explicit loading Enumeration-based loading

25 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 25 The Start Value boot-start (0) system-start (1) auto-start (2) demand-start (3)

26 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 26 Device Enumeration PnP manager primary bus driver device tree

27 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 27 Example device tree

28 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 28 Devnodes

29 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 29 Driver Installation

30 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding 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

31 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 31 Control flow for an I/O operation

32 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 32 I/O Request to a Single-Layered Driver

33 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 33 Servicing an Interrupt Phrase 1

34 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 34 Phrase 2

35 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 35 Completing an I/O Request Phrase 1

36 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 36 Phrase 2

37 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 37 I/O Requests to Layered Drivers

38 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 38 Completing a layered I/O request

39 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 39 Queuing associated IRPs

40 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 40 Completing associated IRPs

41 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 41 I/O Completion Port Operation

42 计算机系 信息处理实验室 xlanchen@05/13/2005Understanding the Inside of Windows 2000 42 Synchronization


Download ppt "计算机系 信息处理实验室 Lecture 12 I/O System"

Similar presentations


Ads by Google