Monday, May 24, 2010

What Do Drivers Do In Computers?

I've been working on a project recently where I get to look at the kinds of questions people ask of Google, when phrased as a question.  For any given subject I get a glimpse of what people want to know, based on how they ask it.

Today's question is a very popular one on the subject of Windows device drivers :

What do drivers do in computers?
To really understand what drivers do in computers, you need to stop for a second and consider what's really going on under the covers.  You have "hardware".  That's the physical stuff - your memory, your CPU, your hard drive, your DVD player, your microphone.  Then you have "software".  That's the programs and files that live as bits (ones and zeroes) in the memory and on the hard drive.  The magic of how computers work could be summed up very briefly as, "The software tells the hardware what to do."

When you load a DVD, there are some physical steps.  You open the tray, usually by pushing a button.  You put the DVD in, and then close the tray either by pushing the button again or giving the tray a little shove.  And then your movie starts playing.  But that's where software comes in.  How exactly did the computer know that you put a new disk in the drive? The DVD player itself has just enough smarts to know when that tray door opens and closes. So when you close it, a signal is sent down the cable that connects player to motherboard. The CPU, which listens to everything going on around it, says "Ok, I just got an XYZ signal from the PDQ cable, what am I supposed to do with that?"

And that's where your "device driver" comes in.  The driver is a tiny little program whose sole purpose in life is to raise its little digital hand and say "Me!  Ooo!  I know how to handle XYZ signals from the PDQ cable!"  Ok, I'm being a little silly, but that's really what it comes down to.  Signals come through that cable, they go over to this little driver program, and the driver speaks a language that the rest of the software (Windows, typically) can understand.  So that XYZ signal is might translate into something like, "A new DVD has been inserted, pop up that dialog box that asks the user what she wants to do with it."

Before Windows, you actually would have had to do this all yourself.  When you bought a new printer or even a mouse, it would come with a disk that contained these drivers.  You'd copy them over to your hard drive, and then have to modify the startup programs to let the computer know these drivers were available.  One of the reasons that Windows took over the PC world was because, in the words of one famous industry analysis, it was just "a big bag of drivers."  That was the whole point -- now you don't have to deal with drivers anymore, they're just there.

Except when...they're not.  New devices come out all the time, it's impossible for Windows to have every driver for every device.  Worse than that, sometimes these driver programs have bugs in them and need to be updated.  So it's important to recognize the role these drivers play, and keep them updated.  Modern versions of Windows have an Update Service that will let you know when it's time to download new drivers.  Or you could look into a service like DriverAgent.com which will do all the work for you, scanning your computer to determine which drivers are out of date and then offering you an easy way to download them all in one visit.

No comments: