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.

According to RedHat

Middleware is software that provides common services and capabilities to applications outside of what’s offered by the operating system. Data management, application services, messaging, authentication, and API management are all commonly handled by middleware.

redhat.com

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.

According to Microsoft middleware acts as plumbing between software to make them interchange data.

Most common example of a middleware that you might have already seen while browsing around in the internet are REST APIs. If you see a website that shows their store location using a small windows with google maps inside, they are using the REST API from Google.

REST stands for REpresentational State Transfer, while the name might sound overly complicated and too technical, the duty of REST is fairly simple. REST acts as a middleware between a server and a web application. In simpler words the Google REST API acts as a middleman between a given website and the Google server and helps them communicate with each other. Other famous examples that use REST APIs include Google, Facebook, Instagram, Twitter etc.

Let us see another example of Middleware, this time in the area of “Distributed systems“. Consider the hundreds of individual weather stations located all over the world. These sensors might be from different manufacturers giving output in different formats like Celcius, Fahrenheit, etc. The program get the data from all these different sensors and and gives this combined data to the software that gives out the weather predictions is an example of middleware!

The reason behind the name “Middleware”

This is simply the fact that this “ware” sits between 2 other “wares” and help make another 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!

Photo of author
Editor
Balaji Gunasekaran
Balaji Gunasekaran is a Senior Software Engineer with a Master of Science degree in Mechatronics and a bachelor’s degree in Electrical and Electronics Engineering. He loves to write about tech and has written more than 300 articles. He has also published the book “Cracking the Embedded Software Engineering Interview”. You can follow him on LinkedIn

Comments are closed.