It does not matter which IoT device, everything has, in some kind an operating system. There are many operating systems, even thousands if we count all the different Linux distributions, but the main ones we all know and use are Windows, macOS, iOS and Android.
An operating system needs to run on the supposed hardware. Not always was everything supported out of the box. Back then, users had to configure several parts manually. Luckily, the user experience has changed in the right way. A user now only needs to download a graphic driver if they have a GPU card.
“macOS” must only support the Macs where, on the other hand, Windows even supports Fridges. It makes a huge difference if an operating system needs to support one kind of processor or every kind of processor and other physical components.
Peripheral devices like keyboards and USB-Sticks must be automatically detected. Also, the operating system needs to be able, to find and on rare occasions even fix defective peripheral devices. Having all the drivers plays an important role here.
The operating system allows developers to develop applications which execute without any problems. Developers do not need to think about hardware because the operating system manages everything in the hidden.
Developers have to care about the quality of the software and the correct implementation of the SDK. Depending on the backwards compatibility, applications may not run on newer versions of the operating system. With updates, certain features can break. For example, Windows put hard work in backwards compatibility; this is why 20-year-old programs still run.
Without the proper handling of available system resources, app developers can try to optimise their applications as much as possible. It will not do much if the os wastes gigabytes of RAM. The os always needs to reserve some space in RAM, but reserving too much can lead to a bad user experience.
Giving applications full control over all the data is a bad idea. So the os needs to prevent access to specific files and places in RAM. Otherwise, applications could read all the sensitive data on the system. A proper permissions system is a must-have for an operating system.
Malware often accesses anything because the user permits the malware's deep integration into the system, mostly because of unawareness. Identifying suspicious software from the web is essential for the user because the problem source always sits in front of the screen.
Imagine the os can not handle multiple applications at once. First, the video has to play for some seconds; then the excel spreadsheet can update. In between no user input is recognised.
Even if the computer has only a single core, the system should parallelise tasks like the human body. Humans cannot work on multiple things simultaneously, because we only have one brain, but we can switch between two tasks very efficiently, making it look like multithreading.
When parallelisation occurs, the os should get along with simultaneous access or writes on the same data. Multiple processes need to be able to communicate with each other without unwanted side effects.
GUI and CLI
The user needs a way to execute and interact with applications. A graphical window-based user interface is a typical and well-known way. The operating system needs to keep track of all the different windows in a stack. Which one is focused an on the top? Then it has to go a step further. What is the current selection of the user in the application? Does the user write something, or is he using a drop-down menu?
The UI needs to be excellent and practical because this is the interface between the user and the operating system. When the user can not talk effectively to the operating system, then the user experience is limited.
The operating system must be capable of handling many different kinds of errors.
It can always happen that the hardware has a minor defect. The os needs to be able to detect this and prevent data corruption. It could occur that a small part of the hard disk breaks. For data loss preventions, the operating system needs to detect and deter further writes on this section. Otherwise, data could be lost.
When app developers do not care about everything, a division through zero can happen. Maybe the application accesses an illegal address in the memory. Depending on the software, things like this can happen in everyday use. The operating system needs to handle daily things like these and keep the system working. If a minor bug in an application could crash the computer, then the user experience would be a total disaster. It would be better if only the app crashes.