stackmaster wrote on Wednesday, June 26, 2019:
No disconnect. I am aware of the current FreeRTOS model. You are speaking about what is. I am speaking about what could be.
First, there are two distinct topics here.
One is xWaitForAny/xWaitForOne, which, if existed, would go a long way to getting me, personally, what I want, with no other change at all.
The other is that, for MCU’s with a sufficient amount of Flash/RAM, it is possible for FreeRTOS to more to have Big OS features.
One could start with the smallest notion of what constitutes an OS, and start adding features to this smallest notion. One might ask if the OS is multitasking. One might ask if there is hardware-enforced memory protection. One might ask if there is demand-paging. One might asks there is a distinction between user-mode/kernel-mode, and if so, whether user-mode code can gain acess to i/O registers. One might ask if it provides real-time support, etc;
As one adds features to the hypothetical OS, the size of the code will grow, naturally. No one tool fits all situations, and so, OS’s will sometimes have a particular purpose, and certain features will be excluded, and some included. FreeRTOS has obviously been a fanstastic OS over the years and has served its purpose well for its chosen feature-set.
If, it is predicated that FreeRTOS is only to be run on low foot-print MCU’s, and that any change that causes it to grow in size and or complexity is not permitted, then, well, there would be nothing to discuss, because the predication would mean that no non-sanctioned feature would be allowed, no matter how much flash/RAM is available.
But if one discovers, by coincidence, that FreeRTOS currently runs on MCU’s that have near-Big-OS Flash/RAM, it is natural to ask what would happpen if FreeRTOS were modified to become a Big-Little-OS on these devices. By “modified”, I do not mean to say that it is changed fundamentally. I mean modified in the same spirit of a la carte pick-and-choose that currently exists.
Another way to look at it is to imagine starting a new project to write preemptive multitasking OS from scratch, specifically targeted at sub-$10 MCU’s that have at least 4MB of Flash and 4BM of RAM. One will go through the usual (arduous) decision-making process of deciding what features should be included, size/performance trade-offs, abstraction barriers for hardware, etc. When one is finished, one will have a hypothetical OS.
IMO, FreeRTOS (Richard), has done such a good job of being a “Little OS”, that this little OS is not so far from a Big OS in features for system-level “user-mode” coding. So if one were to write a new hypothetical “Mid-Size” OS that is not big, but capable of running Big Programs under a model that Big OS’s have done for decades; would one rewrite the hypothetical OS from scratch? Of course not. When you have something that is already 95%+ of where you want to be, you don’t start from scratch. You use what’s there, or at least try.
The question then becomes:
How wide is the gap between what exists and what you want?
FreeRTOS is 95%+ (at least) of what I would want if I needed a “Little OS” that was capable of runing my Big Apps on sub-$10 devices in a manner that is currently done on Big OS’s. No, my apps would not run on an 64K/4K machine, but I’m OK with that.
There are quite a few people who would be quite intrigued by being able to plop a distinct, compiled binary onto a running FreeRTOS MCU and have it execute in a manner that is currently done on Big OS’s. It would be a sweet spot between less capable RTOS’s and Linux/Windows Embedded. I see opportunity here.