News for hackers. Stuff that matters.
Re:Lua-RTOS: a real-time operating system for ESP32 by bob1029 on Wednesday June 09, 2021 @06:44PM (#27454276)
I do soft real-time in .NET5 without any problems.

I find that if I completely abduct a high-priority thread and never yield back to the OS, things on the critical execution path run incredibly smoothly. I am able to execute a custom high precision timer in one of these loops while experiencing less than a microsecond of jitter. Granted, it will light up an entire core to 100% the whole time the app is running. But, in today's world of 256+ core 1U servers, I think this is a fantastic price to pay for the performance you get as a result. Not yielding keeps your cache very toasty.

Avoiding any allocation is also super important. In .NET, anything touching gen2 or LOH is death sentence. You probably don't even want stuff making it into gen1. Structs and streams are your friends for this adventure.

There are no comments on this comment yet.