News for hackers. Stuff that matters.
Re:What? More 8-Bit Microcontrollers? by radarsat1 on Friday July 01, 2022 @07:42AM (#31945016)
It really depends on what you're doing, but there are certainly versions of Linux that are capable of hard real-time performance. But it shouldn't be too surprising that the goals of an operating system designed for multiuser, multiprocess context is not well aligned with the needs of real-time machine control applications. The trainer is correct, often times it really is appropriate to just delegate those requirements to a dedicated controller whose job is to do nothing else than keep performing the same DSP loop over and over in a well-timed manner. However, there are certainly cases where you might want to interact smoothly between real-time and non-real-time components of a system and use things like shared memory, and in those cases, there definitely are Linux-based solutions available. Like most things in engineering, there are trade-offs along this continuum, so knowing the options and the pros and cons so that you can make a good design decision is just part of the job.
Re:What? More 8-Bit Microcontrollers? by monocasa on Friday July 01, 2022 @10:30AM (#31946903)
The only version of linux I know of that's capable of hard real time performance isn't really linux anymore but instead just runs an rtos microkernel underneath linux to make real time guarantess and simply runs linux as the lowest priority task on that kernel.

https://en.wikipedia.org/wiki/RTLinux

Re:What? More 8-Bit Microcontrollers? by zozbot234 on Friday July 01, 2022 @11:02AM (#31947330)
RTLinux is quite old. There's an official patchset for real-time preemption in Linux that's making its way to the mainline kernel.
Re:What? More 8-Bit Microcontrollers? by monocasa on Friday July 01, 2022 @11:19AM (#31947614)
If you're talking about the preempt-rt patches being merged, those are very soft real time.
Re:What? More 8-Bit Microcontrollers? by freemint on Friday July 01, 2022 @10:20AM (#31946769)
Hard real time, yes. But with very high tolerances compared to what a MHz processor can accomplish just running the application.