Hardware, Software, Firmware, Middleware, Drivers, OS & Applications, The Difference?

We hear a lot of these “wares” terms all the time, some are hard, some are soft, some are firm and some are in the middle. But why some many types of wares? How do they all fit in? Let’s learn more about them in this article.

Let’s start with the familiar term hardware.

Hardware

What is Hardware? Hardware is a system consisting of electronic devices, designed to work together as a single unit.

It is the only tangible “ware” out of our list that you can physically interact with. Examples include PCBs like motherboard, RAM, Integrated Circuits, Processor, Microcontroller, etc.

For embedded engineers, the assembled system is the hardware.

The reason behind the name “Hardware”

Hardware is named so since it is the hardest part to change in a given product’s life cycle. If you need to change it, you need to design the PCB, manufacture it, assemble components on it, do the necessary tests to ensure everything is connected in the way it is supposed to be and all the components are working as they should. After all of this is done the hardware is said to be “ready” for software development.

Firmware

What is Firmware? Firmware is a program that is specifically designed to work with particular hardware and it lives in non-volatile memory such a flash and it is executed directly from it.

Originally Firmware is written on Masked ROMs, on which the data cannot be changed once written. The products were shipped with these unchangeable programs called firmware and they run for ages till the device goes out of use. Nowadays these kinds of firmware can be found in devices like TVs, washing machines and microwaves. On your computer, it can be found in the BIOS of your motherboard.

The first replacement of Masked ROMs came in the form of EPROM which can be erased by exposure to UV light and then reprogrammed as required. Then came EEPROMs which used electricity to change the contents. Nowadays the Masked ROMs have been replaced with Flash memory, which is cheaper and serves the purpose. (You can refer to this article to read more about the different types of memory.)

The reason behind the name “Firmware”

Firmware is named so because it is not “hard” to change, at the same time it is not “easy/soft” to change. You can always install applications on your smartphones and computers, but to change/update the firmware you need to download it, verify the integrity of the data, reboot the device and go into boot mode (to read more about boot mode and bootloaders refer to this article), then rewrite the flash memory and reboot it again in normal mode.

During development, it is done with the help of programmer/debuggers like JTAG and SWD which directly connects to the flash memory via a serial protocol like SPI or UART to transfer the code from the computer to the embedded device.

It is the job of embedded firmware developers is to write this program. (Though many job ads refer to them as embedded software developers which is a misnomer)

Software

What is Software? Software is a program that can work on a wide variety of hardware and they are usually copied from non-volatile memory (like hard-disk or SSD) onto volatile memory (like SRAM and DRAM) before they can start executing.

(You can refer to this article to read more about the different types of memory.)

The reason behind the name “Software”

Software is named so since they are very easy to change (soft is the opposite of “hard”). The end-user can do it with no trouble at all. The software come in the form of set up files either in the form of removable media like CDs, DVDs and flash drives or downloaded from the internet straight onto the hard-drive. They are then installed onto the hard-disk. Once invoked, the code to be executed is then transferred to the RAM and run from there.

Examples of software can include Operating systems, all the applications that run on them, drivers and middleware. Let’s have a closer look at these different types of software in the next section.

Types of software

Operating System

Let’s start with the software that you are all familiar with i.e Operating Systems.

What is an operating system? An operating system is a program that abstracts the underlying software with the aim of improving the efficiency and ease of use both for the end-users and application programmers.

An OS does its job by abstracting the memory, processing power and I/O such that multiple processes can run simultaneously by sharing the available hardware resources without the knowledge of each others’ existence.

Mainstream examples include Windows, Mac OS, and Linux’s various distros for computers and Android and iOS for smartphones. For embedded devices, examples include FreeRTOS, Contiki and embedded Linux.

Device Drivers

What are device drivers? Device drivers are programs that can control a given hardware and provide a software interface to it. Other programs like Operating Systems can interact with the hardware through this software interface without needing to know the actual underlying implementation of the software interface.

An interface is nothing but a group of functions. All operating systems talk to hardware via some predefined software interfaces.

For example, I could design an operating system that hands Wireless cards with 4 predefined functions/interface as below

turn_wifi_on()

turn_wifi_off()

connect(string AP_name, string password)

disconnect()

Every Wireless card manufacturer who wants to make his device work on my operating system must provide a driver software which has these 4 functions. My operating system can then happily call these functions whenever the end-user needs something to be done. This is just a simple example of how drivers are implemented. I hope you got the point.

Applications

Applications run on top of device drivers and operating systems. Example of applications include Browsers, Word processors, Multimedia players, etc.

These applications cannot talk to the hardware directly. Instead, it does it through the operating system and its system calls.

Middleware

What is Middleware? Middleware is a computer program that connects 2 software together. The 2 software that needs to connect can be in the same machine or in 2 machines in the same room or it can be in 2 corners of the world.

The job of middleware is to combine the 2 programs and make a bigger one. This one is a bit tricky as the 2 “wares” that the middleware connects can be anything as mentioned in the above paragraph.

For example, consider hundreds of individual weather stations located all over the country combining their data to give weather predictions. The program that combines this data to give out the weather predictions is an example of middleware that connects separate hardware together.

On the other end of the spectrum is the middleware in embedded systems, which is basically a layer of computer programs that sit between the Hardware Abstraction Layer and the application layer to help them communicate with each other. The bigger “ware” being created here is the firmware!

The reason behind the name “Middleware”

This is simply the fact that this “ware” sits between 2 other “wares” and help make a bigger ware as we saw in the 2 examples above.

Some more “wares”!

Since we are looking at “wares” let’s have a look at few more briefly.

What are Adwares? These are advertising programs that come with free applications, to help the application maker to earn some money. These days they come with many free smartphone applications that you get for free.

What is Bloatware / Fatware? These are applications that are pre-installed along with the Operating System on our computers and smartphones which are strictly not essential for the functioning of our devices.

What is Vaporware? These are programs that are already announced by companies but yet to be released.

Next, let’s look at some system security-related “wares” or computer programs. They include Malware, Spyware, and Ransomware.

What is Malware? Malware, as the name suggests, is a Malicious computer program whose job is to render the system unusable by hogging up all of its resources.

What is Spyware? Spyware as the name suggests, take out information from your system and pass it along to the person who is interested in the data.

What is Ransomware? Ransomware is a program that will simply lock you out of your system and in exchange for money, will give the access to your system back to you.

Related Questions

What is the difference between a BIOS and a firmware? BIOS is an example of firmware that is installed on the motherboard of our computers.

What is the difference between firmware and software? Have a look at the table below.

FirmwareSoftware
Built for specific custom hardware and cannot be used elsewhereBuilt to work on many different hardware of the same class
Runs directly from nonvolatile secondary memory like flash and EEPROMsCopied from non-volatile secondary memory like hard disks, SSDs or CD ROMs onto volatile primary memory (RAM) before they are executed
examples include BIOS on motherboards, programs that run our microwave and TVsExamples include operating systems like Windows, Linux, and android, applications that run on top of these operating systems.

I hope you enjoyed reading this article. Feel free to share it with your friends and colleagues!

If you have any questions or sugessions you can also email us or contact us through this link!

EI

We’re passionate about inventing embedded devices and we hope you are too! This blog deals with a wide variety of topics from C programming to IOT to networking certifications and more. Hope you enjoy your time spent here and hope you get some value out of our blog!

You may also like...