Hacker News new | ask | show | jobs
by comboy 2236 days ago
I wonder what's your use case for RTOS? I don't really know any problems that couldn't be solved with micros communicating with linux. Seems like even SpaceX gets away with it.

I mean there seem to be the market so clearly there are some people who need it, I just would like to learn more about where is it really needed.

4 comments

SpaceX uses FreeRTOS and VxWorks for chips that need hard real time guarantees from what I've heard.
It's not that the problems couldn't be solved that way, it's that they don't necessarily get any simpler. Adding an external micro and all the support it needs is added cost, maybe added real estate, power budget and very often, it makes the solution more complex and less reliable.
RTOS are mainly for micros communicating with Linux.

Lots of time they are just a giant C library that goes into the same a.out, that for devs look close enough to let himself pretend there will be an OS running his code.

Stuff powered from a coin cell battery?
From coin cell battery you can power a microcontroller that is sleeping most of the time, not a real-time operating system.
You can do exactly this with an ESP32. It's got an RTOS (FreeRTOS) which will spend most of its time sleeping https://learn.circuit.rocks/esp32-deep-sleep
Debatable. Personally I would not try to do a project that uses wifi on a cell battery. And if you don't need wifi then you have much better options that use low current not only while sleeping (e.g. nrf series)

But my main point which I should have included in the previous reply was - what does real time OS have to do with the project being run from a cell battery?

So my assumptions in the original question a number of comments above (in the context of the comment above it) were:

- something running regular Linux would be too heavy (though I don't know if that's really the case, especially if you only turn it on a few times a day on average for a little bit)

- adding the "OS" abstraction would presumably result in access to higher quality ecosystem of libraries than whatever is available on bare metal directly (as I assume some of those libraries depend on the "OS" for event handling etc.) - which was the complaint in the comment I was replying to

But like I said, I know very little about this area, so if any of this doesn't make sense, just ignore my comment :D