1

References: "How drivers work?" (Question) (My Answer)

The OP asked about drivers:

As far as I know a driver is a piece of software responsible for controlling some piece of hardware.

This is the set up I envisaged as the motivating background to the question:

  • In embedded systems, hardware such as printers are operated from traditional PCs.
  • This hardware is physically separate from the PC (they would typically have their own microcontrollers or even CPUs)
  • The hardware communicates with the PC over wired or wireless links.
  • A piece of software (called a driver) is needed on the PC's side of the communication.

At the time I answered, there was a long answer which currently has 2 upvotes that spoke about layered operating systems and interrupts. That answer didn't address the question of how the drivers, being software that sits on the CPU of the PC, causes things to happen on the other piece of hardware.

I therefore wrote an answer that (in retrospect) pointed out the obvious - it doesn't. It simply communicates with the other device's operating software, which in turn controls its hardware.

My answer currently has 3 downvotes. I'd like to know whether it's because:

  • I didn't state my assumption as I did in this meta question;
  • it pitched at too high a level (the OP requested this: "at a high level ... how does such a thing work?");
  • there were no links to external references (neither does the upvoted answer); or
  • the OP's question was downvoted and is now on hold (but then why penalise answers?)

Or is it something else?

I'm looking for some idea of how to improve my answer. If that's not practical to do or if I've totally missed the point, I'm also prepared to delete my answer altogether.

1 Answer 1

4

I didn't down vote your answer.

Some people do down vote answers to low value questions as a form of "don't encourage bad questions", but I don't think that's the case here.

If you ignore the other two answers, the question can be boiled down to

What's a device driver and what makes it special or different from normal code so it can control hardware?

and your answer is more or less

The device driver software sends messages to the device.

That's not an overly helpful answer. At the time you wrote it, it would have helped to include information about memory mapping and perhaps a condensed discussion on permissions & why application programs are not allowed to control hardware directly. A couple of links to external resources tend to help as well.

Also, I'm not sure about your assumption It simply communicates with the other device's operating software. I'm old enough to remember dumb peripherals that didn't have microcontrollers, CPUs or operating systems. We still had device drivers though.

3
  • Ok, thanks for that perspective. As an embedded software developer, I see a significantly bigger difference between writing PC software vs writing device firmware compared to writing PC software vs writing PC drivers. What you say makes sense, though, so I've deleted my answer. I'd normally consider improving and then undeleting it, but since the question itself was downvoted, I think I'll just leave it alone.
    – Lawrence
    Feb 25, 2016 at 1:01
  • 1
    @Lawrence the question itself is now closed and will almost certainly be deleted once it is closed for three days. It is overly-broad, does not show any research effort, and can be at least partially answered by the canonical How Do Computers Work?
    – user22815
    Feb 25, 2016 at 16:56
  • 1
    Thanks @Snowman. The Talking with Peripherals portion does answer the question.
    – Lawrence
    Feb 25, 2016 at 22:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .