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
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, etcScanner, cameraModemYou 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 usesWindows XPAfter 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 deviceElectronic signalAdvanced with operating system and softwareprograming languageMutual translation between.Operating systems where device drivers typically account for more than 70% of the totalkernelSource 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 systemconfiguration fileIt can be said that without the driver, the hardware in the computer cannot work.The drivers of hardware are different due to different operating systemscompatibilityAnd enhanced hardware functions will continue to upgrade the driver.E.g. NvidiaGraphics card chipThe company will upgrade every month on averageGraphics card driverProcedure 2-3 times.Drivers are part of the hardware when you installNew HardwareThe 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 thecomputer 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 timeheadache。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.
stayWindowsIn 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 controllerSteering wheel, rockerDancing blanketThe external printer should be installedPrinter DriverInternet 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.
stayWindows 9xDrivers can be divided into sound card driversGraphics card driverProceduresMouse driveProcedureschipset 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 diskfloppy disk drive, monitor, andStandard equipmentAll can be driven by the standard drivers provided with Windows, except for other specific functions.If you needDOSIf 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.
ForWindows 9xThe 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: inBottom upIn the test, you need to write a module called test driven to call the module under test.testDrive moduleConnect the module under test in the same way, and send it to the module under testtest caseData, 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 essentiallySoftware code, the main function iscomputer systemCompleted with hardware devicesdata transferOnly 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 bothSeamless connection[2]。
With the rapid development of electronic technology,Computer hardwareThe 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 likeCPU, memory, motherboardfloppy 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 hardwarepersonal computerTherefore, 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 notLinux systemStandard drivers, such as ashmen, binder, etc.
definition
Announce
edit
Drivers can be classified as officialOfficial edition、MicrosoftWHQLCertified version, third-party driver, modified version of enthusiast, betaBeta。
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 asPublic driver。Usually, the official version is released in the following ways:Official websiteThere are two methods: release and CD attached to hardware products.StabilitycompatibilityGood 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.yesMicrosoftThe purpose of a driver certification for each hardware manufacturer is toTest DriverWith operating systemCompatibilityAnd stability.That is to say, the driver that has passed the WHQL certification basically does not exist with the Windows systemcompatibilityProblems.
Third party
Third party drivers generally refer to hardware productsOEMDriver released by the manufacturer based on official driver optimization.Third party drivers have stabilitycompatibilityWell, based on the official version driver optimization, it has more complete functions and stronger overall performance than the official version.Therefore, forBrand machineFor users, the first driver recommended by the author is the third-party driver, and the second driver is the official version driver;ForAssembling machineFor 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 theGraphics card driverOn 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 theTest phase, there is no officially released driver.Such drive is often unstablecompatibilityNot enough to waitbug。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 softwarePlatform technology。Because most device drivers run onKernel Mode(kernel mode). Software errors often cause serious system instability, such asBlue screen(blue screen), which is similar to the past programming in user mode (such as DelphiVB、Java)There are obvious differences.
The principle and steps of driving development: 1. Understand the working principle of the hardware at hand, includingProcessor architectureThe datasheet of the peripheral controller is a must read;2. If the whole system you want to develop isbare pagerThe driver you want to develop is a set of hardwarefunction 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,MicrosoftConstantly improve the development software and architecture of drivers, from the early complex and obscure VxD toWindows XPWindows Driver Model (hereinafter referred to as WDM) development architecture on theWindows 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
LinuxAs a variant of UNIX, it inherits UNIX devicesmanagement, all devices are specific filesfile systemThe layer accesses the device.This device management method can achieve "device independence", and can be easily expanded according to the update of hardware peripherals.
Character device has no buffer, in byte orderProcessing data, random reading and writing are not supported.Common character devices, such as common printers, serial ports of the systemTerminal display、Embedded deviceSimple keys, tablet, etc. in.
Block deviceIt refers to the equipment whose data processing unit is block during input and output. GenerallyBuffer technology, supports random reading and writing of data.typicalBlock deviceThere are hard disks, optical drives, etc.
Character devices andBlock deviceThe upper layer facing is the file system layer.For users,Block deviceAnd character device access interfaces are a set of file basedsystem call, such as read, write, etc.
network equipment AndBlock deviceUnlike 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.kernelCommunication with the network driver uses a set ofdata packetTransfer 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 numberIdentification equipmentThe corresponding driver;The secondary device number is used to distinguish specific driver instances.The main equipment number can be obtained throughDynamic allocationOr specified.stayEmbedded system There are few domestic and foreign facilities, and the designated method is generally adopted.
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 ofcompatibilityIn this way, the seamless combination of the operating system and drivers can be ensured as far as possible.
Step 2: Installchipset drivers 。Mainboard driver is mainly used to openMainboard chipsetBuilt in functions and features. The motherboard driver is generally used to identify and manage the hard diskIDEDrivers or patches, such asIntel chipsetOfINFDrive andVIA4in1 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: InstallDirectXDrive.It is generally recommended to install the latest version. The latest version of DirectX isDirectX 9.0C。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 withDirect3D。DirectX isMicrosoftEmbedded on the operating systemApplication 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) andDirect 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 gamesinput 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 computernetwork connections, provide moreConnection 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 arecompatibilityThe 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 printerScanner, read-write machine.
This installation sequence can makeSystem filesReasonable collocation,CollaborationAnd 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 oneInf file。
Files with. inf as the postname are created fromWindows 95A description introduced by the eraequipment installation Information file, which uses specific syntax text to describe theEquipment type, manufacturer, model, file to be copied, target path to be copied, and file to be added toregistryInformation in.By reading and interpreting these words, Windows knows how to install drivers.Almost all hardware manufacturers provideWindows 9xAll drivers under are installed withInformation file。in fact,Inf fileIt can be used not only to install drivers, but also to install software that has nothing to do with hardware, such asWindows 98The "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 toInf fileCopy one copy to the "Windows Inf" or "Windows Inf Other" directory for future use.In addition toInf fileIn addition, there are two special files, Drvdata.bin and Drvidx.bin, as well as some pnf files, which are all Windows files to speed upprocessing speed And automatically generatedBinary file。Drvdata.bin and Dvidx.bin recordedInf fileFor 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 windowsBinary 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 necessaryInf 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 supportsPlug 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 impossibleautomatic recognition All equipment is out, so manual intervention is required when installing many equipment.