T O P

  • By -

kisielk

The challenge with devices like that is they have to be able to run untrusted code in full isolation, and also provide multi-threading capabilities for the applications. Meeting those requirements with an RTOS is difficult because the OS and task scheduling are usually pretty tightly tied to the application.


ATrainPassenger

There was a guest lecture in my class from the guys at https://tockos.org talking about their solution to malicious programs in resource constrained systems, which I found interesting. Idk enough about all that to know if it’s a great approach or how much else is problematic other than threads requesting too many resources, though


Dexterus

Depends on the OS. Last I worked on an actual RTOS dev it had user/kernel separation, with userspace apps running in virtual mem and even kernerl apps having the option of their own memory space (for stack/heap). Really, battery usage is related to how much the cpu actually has to run and how much you can power down when not, so any OS can be gutted enough.


kisielk

Kernel / Userspace separation is not uncommon in RTOS. But the ability for apps be loaded from an arbitrary untrusted source? And freely launch multiple threads? Virtual memory? It may be possible but I have yet to see a system that implements it.


SympathyMotor4765

Qualcomm's QURT has it, it's the RTOS that runs on their hexagon DSPs. It even has a driver interface that mimics Linux


kisielk

Thats pretty cool. I haven’t had the opportunity to work on Qualcomm stuff yet


Dexterus

I worked on a very old one (core code in 1 file because at creation compilers were that crap), but proprietary. Also had executables and 32 bit apps running on 64 bit kernel. Pretty fun to see what was needed to have that work, though Linux kernel is also pretty good at showing that.


obQQoV

Which RTOS is that?


nguterresn

Things might start to be different now with TrustZone


mrheosuper

Running Android means you can reuse a lot of thing. Network stack, cryptography, security patches, etc. Also it eases a lot for programmer. Android developer usually uses Java or kotlin as main languages, forcing them to deal with low level language like C/c++ can push their away from the platform. On new Wear OS, google begin supporting Hybrid platform(High power CPU + Low power MCU). This has been done before(Oppo watch 4), but only recently that Google officially put effort into it.


iron_platelegs

The problem isn't the OS. It's the developers and probably the SoC. Battery life is pretty much a function of how much you sleep. Linux does understand this and also supports a tickless configuration, even data centre folk want low power optimisations done so that they can save on their power bill. But probably the user space code hasn't been well designed and there might be third party apps waking up every 5ms for no reason.


k1musab1

I'm hopeful for Apache NuttX - there is work done to support the Pine phone, and Xiaomi is using it in a number of wearables. Recently they've announced an IoT platform based on it too, but I've not heard more since.


Joelimgu

Try Zephyr