This article is mainly about the introduction of the computer driver, and focuses on the working principle and significance of the computer driver.
Computer driver1 What is the driver
The concept of the driver, the driver is actually a piece of program code that allows the computer to talk to various hardware devices. If a piece of hardware only relies on the operating system without drivers, the piece of hardware will not be able to perform its unique functions. In other words, the driver is a bridge between the hardware and the operating system. It tells the function of the hardware itself to the operating system. It also converts standard operating system instructions into special peripheral commands to ensure the normal operation of the hardware device. jobs.
Drivers also have multiple modes. The most familiar one is Microsoft's Win32 driver mode. No matter you are using Windows 9x series or Windows XP/2000 operating system, the same hardware can be used by installing its corresponding driver. We often see drivers such as For 9x or For NT/2000. Since the kernels of these two operating systems are different, they need to be modified for different versions of Windows. There is no need to rewrite the driver according to different operating systems, which brings great convenience to manufacturers and users.
Sometimes after finding the driver of a certain hardware model, there will be two drivers, VxD and WDM. Among them, the VxD driver is a virtual driver, similar to the driver under DOS. If you are using a Windows 9x system, using the VxD driver will bring out the best performance of the hardware; while the WDM driver supports more The new device can enhance system performance and stability. Only WDM drivers are supported in the Windows XP/2000 operating system. The above content is to answer the question of what the driver is. Next, I will talk about how to download the driver and the specific method of how to install the driver.
2 Why install the driver
Although the Windows XP/7 system can recognize some hardware devices, and automatically install drivers for them. However, the default driver generally does not fully utilize the best functions of the hardware. At this time, the driver provided by the manufacturer needs to be installed.
In addition, some hardware devices cannot be recognized by the Windows XP/7 system, so they cannot automatically install the drivers they need. These require the user to install the device drivers. As shown in Figure 15-1, the hardware device marked with a yellow exclamation mark cannot be recognized.
3 How to get the driver
There are mainly the following methods to obtain the driver of the hardware.
1. The installation CD that came with the hardware purchase
When purchasing a hardware device, a driver installation CD is included in the box. After inserting the CD into the CD-ROM drive, an installation interface will automatically open to guide the user to install the corresponding driver. Select the corresponding option to install the corresponding driver.
How the computer driver worksThe working principle of the computer driver:
The definition of a driver is a special program that allows the computer to communicate with the device. It can be said to be equivalent to the interface of the hardware. Only through this interface can the operating system control the work of the hardware device. If the driver of a certain device is not installed correctly, Will not work properly;
Therefore, the driver is known as the "soul of the hardware", "the master of the hardware", and "the bridge between the hardware and the system" and so on. If the operating system of the newly installed system is installed, the driver may be installed incompletely. The newer the hardware, the greater this possibility. The "icons are big and ugly" that Cai Caixiong saw before is the reason why the driver is not installed;
In software testing: In bottom-up testing, you must write a test-driven module to call the module under test. The test drive module is hooked up in the same way as the real module in the future, sending test case data to the module under test, accepting the returned result, and verifying whether the result is correct. The role of the driver With the rapid development of electronic technology, the performance of computer hardware is becoming more and more powerful;
Drivers are software that works directly on various hardware devices. The name "drive" also vividly indicates its function;
It is through the driver that various hardware devices can operate normally and achieve the intended work effect.
The composition of the driverIf the driver is simple, it is the software that recognizes and runs the hardware normally. Some friends are afraid of the installation of the driver, and many are more interested in the driver. So what is the driver?
The general operating system Windows, its driver is composed of files with the suffix of drv, vxd, sys, dll, exe, ini, inf, etc., among which files such as .drv, .vxd, .dll, and .inf are many drivers The core file. The driver file with the suffix inf is more important to the computer!
The inf file, a file used from Win95 to store device installation information, uses specific syntax text to indicate the type and manufacturer of the device to be installed, as well as the file to be installed and the superscript path or to be added to the registry Information.
You can see that almost all system drivers have the inf file. The driver developed by the hardware manufacturer itself can generally maximize the performance of the hardware of its products, and some large manufacturers have more functions in the driver. Powerful and complete, it is generally provided with the product's CD or floppy disk.
In addition, manufacturers of core chips in hardware devices also provide drivers for hardware devices. These drivers are suitable for all products using the core chip, so everyone calls them "public version" drivers. The stability and compatibility of this drive are very good!
The meaning of the driverThe device driver is closely related to the specific device type. Each IO needs a corresponding device driver, and each device driver can only handle one type of device, because different types of devices have different control methods. For example, for a mouse device driver, it needs to read various information from the device controller, including the moving position of the mouse, which key is pressed, and so on. For a disk driver, in order to perform disk read and write operations, it must know various parameters such as sectors, tracks, cylinders, and heads, and use these parameters to control the disk controller.
Generally speaking, when implementing a device driver, a general structure can be used.
(1) Check whether the input parameter is valid. If it is invalid, an error report will be returned; if it is valid, the input abstract parameter will be converted to control the specific parameters required by the device.
(2) Check whether the device is currently idle. If the device is busy, the IO request this time cannot be completed temporarily, so add it to the waiting queue (blocking queue) and process it later; if the device is idle, check the hardware Status to see if the conditions for operation are met.
(3) The device driver sends a series of commands to the device controller, that is, writes these commands into the various registers of the controller.
(4) After issuing the control command, if the IO operation takes a certain amount of time and cannot be completed immediately, then the driver will block itself until the IO operation is completed, and an interrupt is generated through the hardware, in this interrupt handler Wake up the driver and add it to the ready queue (if the cpu is idle, get the cpu to run).
(5) After the IO operation is completed, the device driver still checks for errors. If everything is normal, some status information is returned to the caller. If this is an input operation, upload the input data to the system software of the upper layer.
In the real-time kernel IO system, the user's IO request is usually processed only a small amount before it reaches the device driver. In fact, the IO system of the real-time kernel acts like a conversion table, converting user requests for IO to the corresponding device driver. In this way, the device driver can obtain the original user's request and operate the device.
ConclusionThis is the end of the introduction about the computer driver. If there are any deficiencies, please correct me.
Related reading recommendations: 8155 driver
Related reading recommendations: What is the impact of the chipset driver is not installed
Cummins 0-20KW Diesel Generator
Cummins 0-20Kw Diesel Generator,Cummins Portable Power Generator,Cummins Open Type Power Generator,Cummins Container Power Generator
Shanghai Kosta Electric Co., Ltd. , https://www.ksdpower.com