Driver

A special program that enables computers and devices to communicate with each other
Collection
zero Useful+1
zero
synonym Device Driver (Device driver) generally refers to driver
Driver generally refers to device driver, which is a special program that can make computers and devices communicate with each other. It is equivalent to the interface of hardware. Only through this interface can the operating system control the work of the hardware device. If the driver of a device is not installed correctly, it will not work properly. Therefore, drivers are compared to "the soul of hardware", "the master of hardware", "the bridge between hardware and system", etc.
Chinese name
Driver
Foreign name
Driver
Full name
Device Driver
Nature
A special program that allows computers and devices to communicate
Role
Interface equivalent to hardware
Application
Hard disk network card sound card etc.

definition

Announce
edit
HP graphics card driver installation
The full name of the device driver is "device driver". It is a special program that can make the computer communicate with the device. It can be said that it is equivalent to the hardware interface. The operating system can only control the work of the hardware device through this interface. If the driver of a device is not installed correctly, it will not work properly. For this reason, the driver plays a very important role in the system. Generally, after the operating system is installed, the first thing is to install the driver of the hardware device. However, in most cases, we do not need to install drivers for all hardware devices, such as hard disks, monitors, CD drives, etc Scanner , camera Modem You need to install the driver. In addition, different versions of operating systems support different hardware devices. Generally, the higher the version, the more hardware devices supported. For example, the author uses Windows XP After the system is installed, there is no need to install a driver.
The device driver is used to tell the operating system the function of the hardware itself and complete the hardware device Electronic signal Advanced with operating system and software programing language Mutual translation between. Operating systems where device drivers typically account for more than 70% of the total kernel Source code, and the update and maintenance of device drivers often involve more than 35% source code modification, so maintaining the consistency between device drivers and the rest of the constantly changing operating system kernel is a challenge for operating system kernel development [1]
When the operating system needs to use some hardware, for example, to let the sound card play music, it will first send the corresponding command to the sound card driver. After the sound card driver receives it, it will immediately translate it into an electronic signal command that the sound card can understand, so that the sound card can play music.
Dell Computer Drive Disk
So in a nutshell, drivers provide an interface between hardware and operating system and coordinate the relationship between them. Because drivers play such an important role, people call them "the soul of hardware" and "the master of hardware". At the same time, drivers are also called "the bridge between hardware and system". The driver is a small piece of code added to the operating system, which contains information about the hardware device. The computer can communicate with the device based on this information. The driver is written by the hardware manufacturer according to the operating system configuration file It can be said that without the driver, the hardware in the computer cannot work. The drivers of hardware are different due to different operating systems compatibility And enhanced hardware functions will continue to upgrade the driver. E.g. Nvidia Graphics card chip The company will upgrade every month on average Graphics card driver Procedure 2-3 times. Drivers are part of the hardware when you install New Hardware The driver is an indispensable and important component. When you install a hardware device that does not belong to your computer, the system will ask you to install a driver to connect the new hardware with the computer system Connect. The driver plays the role of communication, telling the computer system the function of the hardware, and also transmitting the system instructions to the hardware, so that it starts to work.
When you install new hardware, you are always asked to put "drivers for this kind of hardware". Many people start at this time headache Either the disk of the driver cannot be found, the file location cannot be found, or the driver is unknown. For example, the installation of hardware peripherals such as printers is not completed by connecting the cables. If you start using them at this time, the system will tell you that the driver cannot be found. What shall I do? The installation may not be smooth by referring to the instructions. In fact, there are some conventions and general rules in the installation, which can help you to achieve barrier free installation.
stay Windows In the system, you need to install a complete set of drivers such as motherboard, optical drive, video card, sound card, etc. If you need to connect other hardware devices, you should also install the corresponding drivers, such as the controller Steering wheel , rocker Dancing blanket The external printer should be installed Printer Driver Internet access or LAN access requires the installation of network cards, modems, and even ISDN and ADSL drivers. In order to understand the drivers, the following describes the drivers of different hardware devices in the Windows system.
stay Windows 9x Drivers can be divided into sound card drivers Graphics card driver Procedures Mouse drive Procedures chipset drivers Programs, network device drivers, printer drivers, scanner drivers, and so on. Why are there no CPU and memory drivers? Because CPU and memory can be used without driver, most keyboard, mouse, hard disk floppy disk drive , monitor, and Standard equipment All can be driven by the standard drivers provided with Windows, except for other specific functions. If you need DOS If you use an optical drive in DOS mode, you also need to install the optical drive driver in DOS mode. Most built-in expansion cards such as video cards, sound cards, network cards, and peripherals such as printers, scanners, and external modems need to install drivers that match the device model, or some or all of their functions cannot be performed. Drivers can generally be obtained in three ways: first, the purchased hardware comes with drivers; Second, Windows has a large number of drivers; The third is to download drivers from the Internet. The last way is often to get the latest driver.
For Windows 9x The driver package used is usually composed of some. vxd (or. 386),. drv,. sys,. dll, or. exe files. During installation, most files will be copied to the "Windows System" directory.
In software testing: in Bottom up In the test, you need to write a module called test driven to call the module under test. test Drive module Connect the module under test in the same way, and send it to the module under test test case Data, accept the returned results, and verify whether the results are correct, so all programs need drivers. Otherwise, such as printers, stereos and computers can't recognize them. Every computer has a driver when it is purchased.

effect

Announce
edit
Drivers are essentially Software code , the main function is computer system Completed with hardware devices data transfer Only with the help of the driver, the two can communicate and complete specific functions. If a hardware device does not have a driver, only the operating system cannot play its unique functions. That is to say, the driver is a medium between the operating system and the hardware to achieve two-way communication, that is, the functions of the hardware device itself are communicated to the operating system, and the standard instructions of the operating system are also communicated to the hardware device to achieve both Seamless connection [2]
With the rapid development of electronic technology, Computer hardware The performance of is becoming more and more powerful. Driver is software that works directly on various hardware devices, and its name "driver" also vividly indicates its function. It is through the driver that all kinds of hardware devices can run normally and achieve the established working effect.
If the hardware is lack of the "driver" of the driver, then the hardware with very powerful performance cannot work according to the instructions sent by the software, and the hardware is useless. At this time, the computer, as the ancients said, "Everything is ready, only the east wind", and the role of the "east wind" falls on the driver. In this way, drivers really play an important role in the use of computers.
Theoretically, all hardware devices need to install corresponding drivers to work properly. But like CPU , memory, motherboard floppy disk drive , keyboard, monitor and other devices can work normally without installing drivers, while graphics cards, sound cards, network cards, etc. must install drivers, or they will not work normally. Why is this?
This is mainly due to the fact that these hardware personal computer Therefore, early designers listed these hardware as directly supported by BIOS. In other words, after the above hardware is installed, it can be directly supported by the BIOS and the operating system, and there is no need to install drivers. From this perspective, BIOS is also a driver. However, drivers must be installed for other hardware, such as network cards, sound cards, video cards, etc., or these hardware will not work properly.
Of course, not all drivers operate on the actual hardware. Some drivers are just auxiliary system operations. For example, some drivers in Android provide auxiliary operating system functions. These drivers are not Linux system Standard drivers, such as ashmen, binder, etc.

definition

Announce
edit
Drivers can be classified as official Official edition Microsoft WHQL Certified version, third-party driver, modified version of enthusiast, beta Beta

Official edition

The official driver refers to the official driver developed according to the chip manufacturer's design, which is finally released through official channels after repeated tests and corrections. Also known as Public driver Usually, the official version is released in the following ways: Official website There are two methods: release and CD attached to hardware products. Stability compatibility Good is the biggest highlight of the official version driver, and it is also a significant feature that distinguishes the modified version from the beta version. Therefore, ordinary users are recommended to use the official version, while players who like to taste new things and reflect their personality are recommended to use the modified version of fans and beta version.

Certified version

WHQL is the abbreviation of Windows Hardware Quality Labs, which is interpreted as Windows Hardware Quality Labs in Chinese, and the abbreviation classification is electronic electrician. yes Microsoft The purpose of a driver certification for each hardware manufacturer is to Test Driver With operating system Compatibility And stability. That is to say, the driver that has passed the WHQL certification basically does not exist with the Windows system compatibility Problems.

Third party

Third party drivers generally refer to hardware products OEM Driver released by the manufacturer based on official driver optimization. Third party drivers have stability compatibility Well, based on the official version driver optimization, it has more complete functions and stronger overall performance than the official version. Therefore, for Brand machine For users, the first driver recommended by the author is the third-party driver, and the second driver is the official version driver; For Assembling machine For users, the selection of third-party drivers may be relatively complicated, so the official version of the driver is still the first choice.

Revised version

Enthusiasts first remind me of video cards. Why? Because fans have always been used to describe game lovers. This idea of the author also coincides with the birth story of the revised version of the enthusiast, because the driver of the revised version of the enthusiast first appeared in the Graphics card driver On the other hand, due to the enthusiasm of many fans for games, their expectations for the performance of video cards are relatively high. At this time, the video card drivers released by manufacturers often cannot meet the needs of game enthusiasts. Therefore, the video card drivers that have been modified to meet more functional requirements of game enthusiasts also came into being. Today, the modified version of the enthusiast driver, also known as the modified driver, refers to the modified driver, but does not specifically refer to the modified driver.

Beta

The beta driver refers to the Test phase , there is no officially released driver. Such drive is often unstable compatibility Not enough to wait bug Taste and risk always exist at the same time, so users who use beta drivers should be prepared for failure.

Driver development

Announce
edit
The development of drivers is very challenging, because it must be coordinated with the relatively clear and advanced hardware and software Platform technology Because most device drivers run on Kernel Mode (kernel mode). Software errors often cause serious system instability, such as Blue screen (blue screen), which is similar to the past programming in user mode (such as Delphi VB Java )There are obvious differences.
The principle and steps of driving development: 1. Understand the working principle of the hardware at hand, including Processor architecture The datasheet of the peripheral controller is a must read; 2. If the whole system you want to develop is bare pager The driver you want to develop is a set of hardware function library But if you plan to use an operating system in the product, you need to be familiar with the relevant internal operating principles of this operating system before developing drivers, because what you write is that drivers need to be well "embedded" into the environment of this operating system.

Microsoft Platform

In order to greatly reduce the burden of driver developers, Microsoft Constantly improve the development software and architecture of drivers, from the early complex and obscure VxD to Windows XP Windows Driver Model (hereinafter referred to as WDM) development architecture on the Windows Driver Foundation (hereinafter referred to as WDF) has become a new generation of Windows platform driver development architecture. This architecture greatly simplifies the driver development process and is more in line with the object-oriented spirit. This architecture includes two development modes: UserMode Driver Framework and Kernel Mode Driver Framework. Before developing drivers on the Windows platform, you must first install the DDK package, which supports both WDM and WDF architectures.

Unix Platform

Linux As a variant of UNIX, it inherits UNIX devices management , all devices are specific files file system The layer accesses the device. This device management method can achieve "device independence", and can be easily expanded according to the update of hardware peripherals.
The devices in Linux can be roughly divided into three categories: Character device Block device network equipment
Character device has no buffer, in byte order Processing data , random reading and writing are not supported. Common character devices, such as common printers, serial ports of the system Terminal display Embedded device Simple keys, tablet, etc. in.
Block device It refers to the equipment whose data processing unit is block during input and output. Generally Buffer technology , supports random reading and writing of data. typical Block device There are hard disks, optical drives, etc.
Character devices and Block device The upper layer facing is the file system layer. For users, Block device And character device access interfaces are a set of file based system call , such as read, write, etc.
network equipment And Block device Unlike character devices, the upper layer of network devices is the network protocol layer. The device file is a unique name (such as eth0), and there is no corresponding node item in the file system. kernel Communication with the network driver uses a set of data packet Transfer related functions instead of simple read/write operations.
Each device has a pair of parameters of primary device number and secondary device number as the unique identifier. Main equipment number Identification equipment The corresponding driver; The secondary device number is used to distinguish specific driver instances. The main equipment number can be obtained through Dynamic allocation Or specified. stay Embedded system There are few domestic and foreign facilities, and the designated method is generally adopted.

Installation sequence

Announce
edit
General order of driver installation: Mainboard chipset (Chipset) → Video card( VGA )→ Audio → Network card( LAN )→ wireless network adapter Wireless LAN )→ infrared IR )→ Touch control board (Touchpad)→ PCMCIA Controller (PCMCIA) → card reader (Flash Media Reader)→ Modem Modem )→ Others (e.g TV card CDMA surf the internet Adapter Etc.). Installing software out of sequence is likely to cause some software installation failures.
Drive installation process
The first step is to install the service pack (SP) patch of the operating system after installing the operating system. We know that the driver is directly facing the operating system and hardware, so we should first use SP patches to solve the problem of compatibility In this way, the seamless combination of the operating system and drivers can be ensured as far as possible.
Step 2: Install chipset drivers Mainboard driver is mainly used to open Mainboard chipset Built in functions and features. The motherboard driver is generally used to identify and manage the hard disk IDE Drivers or patches, such as Intel chipset Of INF Drive and VIA 4in1 patch, etc. If the AGP patch is also included, you must install the IDE driver before installing the AGP patch. This step is very important, and it is also a direct cause of many system instability.
Step 3: Install DirectX Drive. It is generally recommended to install the latest version. The latest version of DirectX is DirectX 9.0 C。 Some users may think: "My graphics card does not support DirectX 9, so it is unnecessary to install DirectX 9.0C". In fact, this is a wrong understanding, which equates DirectX with Direct3D DirectX is Microsoft Embedded on the operating system Application Program Interface API )DirectX consists of display part, sound part, input part and network part. The display part is divided into Direct Draw (responsible for 2D acceleration) and Direct 3D (responsible for 3D acceleration), so Direct3D is only a small part of it. The new version of DirectX improves not only the display part, but also the sound part (DirectSound) - bringing better sound effects; Direct Input - supports more games input device , and more detailed identification and driving of these equipment, giving full play to the best state and all functions of the equipment; Network part( DirectPlay )-- Enhanced computer network connections , provide more Connection mode It is only because DirectX has made great improvements in the display part and attracted more attention that it ignores the contributions of other parts. Therefore, the significance of installing a new version of DirectX is not only in the display part. Of course, there are compatibility The problem is another matter.
Step 4: At this time, install the card drivers such as video card, sound card, network card, modem, etc. that are plugged into the motherboard.
Step 5: Finally, you can install a printer Scanner , read-write machine.
This installation sequence can make System files Reasonable collocation, Collaboration And give full play to the overall performance of the system.
In addition, monitors, keyboards, mice and other devices also have special drivers, especially some products with good brands. Although they can be correctly recognized and used by the system without installing them, installing these drivers can add some additional functions and improve stability and performance.

Inf file

Announce
edit
How does Windows know which device is installed and which files to copy? The answer lies in one Inf file
Files with. inf as the postname are created from Windows 95 A description introduced by the era equipment installation Information file, which uses specific syntax text to describe the Equipment type , manufacturer, model, file to be copied, target path to be copied, and file to be added to registry Information in. By reading and interpreting these words, Windows knows how to install drivers. Almost all hardware manufacturers provide Windows 9x All drivers under are installed with Information file in fact, Inf file It can be used not only to install drivers, but also to install software that has nothing to do with hardware, such as Windows 98 The "Windows Update" function is supported. The system component downloaded during the update uses the inf file to explain how to install the component.
When installing drivers, Windows usually needs to Inf file Copy one copy to the "Windows Inf" or "Windows Inf Other" directory for future use. In addition to Inf file In addition, there are two special files, Drvdata.bin and Drvidx.bin, as well as some pnf files, which are all Windows files to speed up processing speed And automatically generated Binary file Drvdata.bin and Dvidx.bin recorded Inf file For all the hardware devices described, perhaps friends will be impressed: when we install some devices, we often see a "Create Driver" Information base ”Windows is generating these two windows Binary file
Windows 9x specifically provides the "Add New Hardware Wizard" (hereinafter referred to as the "Hardware Wizard") to help users install hardware drivers. The user's job is to tell the hardware wizard where to find a matching hardware model when necessary Inf file , most of the remaining installation work will be completed by the hardware installation wizard itself.
Installing drivers for hardware devices is not a new thing for Windows 9x users. Drivers need to be installed when installing or reinstalling Windows, and also after purchasing some new hardware. If the driver is not installed correctly, some hardware in the system may not work properly. Although Windows 9x supports Plug and Play , it can save users a lot of work, but because there are many brands and models of PC equipment, and various new products are constantly coming out, Windows is impossible automatic recognition All equipment is out, so manual intervention is required when installing many equipment.