Why are general-purpose OS not good for IoT applications? Is it too complex and not focused enough on the actions?


Why are general-purpose OS not good for IoT applications? Is it too complex and not focused enough on the actions?

In: 0

A general purpose OS has many services typically enabled. As each of these services is a potential attack vector, it adds a lot of risk without any advantage.

Oh wait, you’re asking about real life, not utopia… A general purpose OS usually has far higher system requirements, so the hardware would need to be more powerful and thus more expensive.

1. Security. The broader software is, the more insecure it becomes. I’m not saying it’s full of security holes but it loses that benefit of the perfect marriage of hardware and software.

2. IoT devices generally only have one or two uses so don’t need broad coverage of feature sets that general software brings. A thermostat doesn’t need the software API’s a doorbell needs for example.

The answers given are correct in a way, but IMHO the real reason is little to do with security (IoT devices as a whole are laughably insecure) and more to do with practicality.

A full OS is very “heavy.” There’s a lot of hardware required to implement one. You can’t run it on a $3 microcontroller with 20 pins. But a lot of IoT devices don’t need much more than that. If you’re reading a sensor and transmitting that info to the cloud, you really have no need for several GB of storage and memory and a sufficiently powerful processor (and related peripherals) needed to run an OS. It’s all wasted effort and money for something that has zero benefit to the end user.

I mean, your answer is more or less spot on, something like, let’s say Raspbian running on a raspberry pi, while pretty minimal it can still be considered general-purpose, it does a lot of things in the background, it always “ready” to run whatever you the user types or clicks on, and with that all sorts of processes in the background ensuring internet connection, maybe through wi-fi or cable, a video output, usb devices, all sorts of things. And IoT devices will generally have a handful of purposes, and having something programmed to only do one thing is much more efficient and cheap than something that’s always doing a lot of little things.

If you run some sort of system monitor on your os right now you will see a lot of processes running, and not only that, within these processes there can be many more things going on.

Also security… but… hm idk about that one.

You’re thinking of windows/mac/Linux which are typically bloated with dozens of gigabytes of libraries for every conceivable use.

Linux can be pared down to a few hundred kilobytes for loT devices, works great.

Then there are extremely tiny operating systems designed for minimal hardware that still qualify as general purpose.


Lastly though, if all the lot device does is a few simple tasks there’s no need for an operating system. Link a networking library into the app and you’re all set.

*One inexpensive Linux system hardware solution is the Raspberry Pi Zero. They retail for $5 and run a full version of Debian. The Zeros i/o pins aren’t fantastic, 3.3v only, so add a $0.75 Arduino and you can interface with most sensors/circuits easily.

awart from other answers, sometimes you might need certain real-time guarantees that a general purpose os just wasn’t designenld for and can’t easily provide. Ex driving a neopixel strip requires tight timings and is easier done an an arduino than any windows or linux machine

Many IoT devices nowadays are based off of the exact same core components of a General Purpose OS. For example, Ubuntu is a general purpose OS that uses a core component called the linux kernel. In fact, if you look in a router, you will find it has many of the same core libraries that Ubuntu has.

General Purpose OSs just add on more parts to make it more accessible to users (ie, user-interface, programs like text editors etc.)