Windows debugging 8

Source: Internet
Author: User
Tags configuration settings

I/O system components

============================

Windows I/O systems are designed to provide device abstraction for applications with the following features: hardware devices and software devices (Virtual Devices and logical devices ).

  • Unified Security and naming for cross-device shared resources
  • Provides high-performance asynchronous support for measurable applications based on Io packages.
  • Allows drivers to be written in advanced languages and easier migration between different machine architectures.
  • With hierarchical and scalable capabilities, other drivers are allowed to transparently modify the behaviors of other drivers or devices without any modifications to other drivers or devices.
  • Dynamic Loading and uninstallation, so that the driver can be loaded as needed, and unmounted when not needed, without occupying system resources.
  • Plug-and-play is supported, that is, the system locates and installs drivers for the newly found hardware device, and then allocates the required hardware operating system resources to them.
  • Supports power management, so some devices in the system can enter the power-saving mode.
  • Supports multiple installable file systems, including fat, CD-ROM file systems (CDFs), Universal Disk format UDF, and Windows File Systems (NTFs ).
  • The support of windows management tools and the ability to diagnose, so the driver can be managed through the Windows Management Instrumentation application.

The windows I/O system consists of many executive components. For details, see.

  • The I/O manager is the core of the entire I/O system. It connects applications and system components to virtual, logical, and physical devices. It also defines the infrastructure that supports device drivers.
  • Device Drivers generally provide I/O interfaces for certain devices. the device driver accepts the commands that the IO manager sends to them and then notifies the IO manager when these commands will end. device Drivers often use Io manager to forward IO commands to other device drivers, which are shared in device interfaces or controls.
  • The PnP Manager and the IO manager are also very closely integrated with the driver of a device called the bus driver. The bus driver is used to know the allocation of hardware resources and detect and respond to the addition and removal of hardware devices. when a device is added to the system and does not have an appropriate device driver, the plug-and-play component is executed to call the device installation service of the User-mode PnP Manager.
  • The power manager is also very tightly integrated with the I/O manager, which guides the system and a single device driver to perform Power status conversion.
  • Windows Management Instrumentation (Wmi) supports the WMI provider function called Windows Driver Model (WDM), allowing device drivers to work indirectly like providers, allows device drivers to use wdm wmi providers to communicate with WMI services like media.
  • The registry stores the descriptions of basic hardware devices attached to the system like a database, as well as driver initialization settings and configuration settings.
  • INF file. the file with the suffix INF is the driver Installation File. the inf file associates a specific hardware device with the driver assumed to be the primary control of the device. they constitute commands similar to scripts to describe 1, related devices; 2. the source and target locations of the driver file; 3. required Registry Modification for Driver Installation; 4. device dependency information. windows uses digital signatures to verify if the driver has passed Microsoft's Hardware Quality Lab test. the digital signature exists. cat file.
  • The Hardware Abstraction Layer isolates the driver from a specific processor and interrupt controller, thus shielding their details and hiding the differences between different platforms. in essence, Hal is on all computer boards and is not controlled by other devices.

 

I/O system structure and mode

======================

In Windows, threads perform Io operations on virtual files. the operating system abstracts all IO requests into operations on a virtual file ., hiding the fact that the object for Io operations may not be a device with a file structure. this abstract generates the device-to-device interface of the application. A virtual file indicates that a thread is a file (file, directory, pipeline, and mail slot) for any source or target IO Device ). all read or write data is seen as a simple byte stream targeting these virtual files. user-State applications call documented functions. They call internal Io system functions in turn to read data from files, write data to files, or perform other operations. the IO manager dynamically detects requests to these virtual files and executes the requests to the appropriate device driver.

The following is the basic architecture of a typical Io request process.

 

 

Io Manager

-------------

The IO manager defines an orderly framework in which IO requests are passed to the device driver. the IO system is packet driven (packet-driven. most IO requests are expressed by Io request packet (IRP). IRP can flow among multiple Io system components. fast Io is an exception and does not use IRP. it is designed to allow an application thread to process multiple IO requests concurrently. an IRP is a data structure that contains the complete information describing IO requests.

 

The IO manager creates an IRP representing the IO request, transmits the IRP pointer to the correct driver, and analyzes the IRP packet after the IO operation is completed. in comparison, the driver accepts the IRP package, executes the operation specified by the IRP, and sends the IRP package back to the IO manager, if it is not intended to be passed to another driver for further processing.

 

The IO manager provides code for creating and destructor IRPs. These codes are common for different drivers. All Drivers call these functions to execute their Io processing. by enhancing the general tasks of the I/O manager, individual drivers become simpler and simpler. for example, the IO manager provides a function that allows one driver to call another. it also manages the buffer of IO requests and provides timeout support for drivers and records. The record here refers to the record when the installable file system is loaded into the operating system. functions with hundreds of different I/O managers can be called by the driver.

 

The IO Manager also provides flexible Io services that allow environment subsystems such as Win32 and POSIX to implement their own Io functions. these services include mature asynchronous Io services, which allow developers to establish measurable high-performance server applications.

 

The driver presents a unified, modular interface that allows the IO manager to call any driver without the need to know the specific information about the driver and the internal implementation details. as we mentioned earlier, the operating system treats all IO requests as an operation file. the driver converts a request to a virtual file to a request to a physical device. drivers can also call each other to implement layered and independent Io request processing.

 

In addition to enabling, disabling, reading, and writing normally, the Windows Io system also provides many advanced features, such as Asynchronous processing, caching, and scatter/gather Io.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.