How do a computer’s hardware and software actually connect?

841 viewsOtherTechnology

How do a computer’s hardware and software actually connect?

In: Technology

16 Answers

Anonymous 0 Comments

The short and real answer is ‘firmware’. Each piece of hardware is programmed by the manufacturer with something called firmware, it is like the middle ground between ‘software’ and ‘hardware’. This firmware will control the basic function of the hardware the operating system is trying to use. In order to access that firmware for the operating system, the operating system needs something called a ‘device driver’. That is a special piece of software that translates the operating system’s desires to the hardware’s function. Although it is old now, I used a DVD-ROM as an example. Windows or Mac has no idea how to spin up a DVD ROM. It doesn’t know where to point the laser, it doesn’t know what RPM it needs to spin at, it doesn’t know anything. That is controlled by the firmware and the device driver allows the operating system, and by extension some application developer, a simple way to use a piece of hardware without having to learn everything about it.

Say I am an application developer and I have a piece of hardware that scans inventory. I need to be able to do things like fire the scanner off and read what comes from it. So, I download the device’s driver and that will usually give something called an API or something like it. Using the API documentation I program my crappy software to utilize this scanner. Instead of learning all the ways this scanner works and its circuitry, I read the documentation from the developer who wrote the driver and I find the ‘scan’ function and then I can do something with that data I get back from the API.

A really popular, nowadays, driver API is the CUDA API that goes along with NVIDIA graphics cards. To connect my software to that hardware so I can run really complicated models I find the driver guide (https://docs.nvidia.com/cuda/cuda-runtime-api/index.html) and I program my software to access the API when I need to do some hefty 3d modeling or something.

You are viewing 1 out of 16 answers, click here to view all answers.