What are the changes that Linux has to face to deal with IoT devices? What alternatives to Linux are usable today (i.e., open source :-).
What is essential about IoT devices: they are somehow (wirelessly) connected, and hardware cost is extremely important.
Linux is optimised for devices with infinite resources. IoT devices on the other hand use Cortex-M class processors. There are many many different CPUs (e.g. TI has about 400). They have 100s of KB of on-board memory. They are too large for bare metal programming, but way too small for Linux. This type of system is not going to go away, there will always be markets where saving a few cents is worth it.
If you strip down Linux below about 8MiB, it simply stops being Linux so it would be more appropriate do use a different operating system. OTOH according to the tinyfication project, the alternatives have less capabilities and less of a community.
Wolfgang says that although large parts of Linux are of high quality, there is also tremendous complexity and that corner case communities (e.g. realtime) are also not very large.
The claim that the alternatives to Linux are proprietary is certainly wrong: there are a lot of open source alternatives. And they are active, e.g. RTEMS and RIOT mailing lists have a lot more traffic than linux-rt.
Differences between Linux and deeply embedded OSes: No address space separation. Very simple scheduler, e.g. fixed timewheel scheduler or fixed priority scheduler. There is no basic system/distro, instead there is just your application code which is combined with the OS. There is usually also no way to dynamically load applications (even if tasks can be created dynamically, new code can’t be loaded without rebooting).
Because payload application code is directly linked with the OS, there is no “license barrier” which means that the OS license affects the payload application.
Similar with Linux: Cross-toolchain, make, git, gdb, C/C++. Even though most OSes don’t offer POSIX, you actually don’t use so much of that (most is stdc) and you anyway already use tons of libraries on top of POSIX so the difference isn’t that large.
High level comparison of different OSes: Wolfgang has a table that evaluates on maturity, #supported arches, documentation, ….
RTEMS is as old as Linux. It supports many CPUs and boards. There are multiple commercial vendors involved in the development. It has POSIX support except fork() and execve(). It has networking: FreeBSD or LWIP. It doesn’t really use MMU but it has support for Memory Protection Units. Configuration is defined with #define’s in a configuration header, the OS is built based on that. It has a x86 target which can run under qemu, which is very convenient for debugging – qemu has very good support for debugging OSes, but since it’s all linked together the application == the OS.
FreeRTOS is very very small (few KB), it has virtual address space support and dynamic task creation. Multiple IP stacks, with socket API. Very small community though it is used quite a lot.
mbed is only for Cortex-M. It has a web-based development environment and a C++ SDK. It includes an application deployment mechanism, through USB mass storage. Pretty large at 512KiB.
Zephyr is very small, supported by Linux Foundation. Build system and coding style is similar to Linux. Two kernels: a nanokernel that serves a single task + ISRs and some non-preemptive threads (=fibres), or a microkernel that supports multiple tasks.