1

There was a discussion here that is now closed: https://stackoverflow.com/questions/25871579/what-is-the-difference-between-rtos-and-embedded-linux#:~:text=Many%20RTOS%20are%20not%20full,essentially%20the%20scheduling%20kernel%20only.&text=Critically%20Linux%20is%20not%20real%2Dtime%20capable

The accepted answer could be summarised as "Critically Linux is not real-time capable".

However, I think this is misleading. When it comes to an OS like linux, you have to distinguish between applications, the kernel, and device drivers.

According to my understanding (having written many Unix device drivers and worked on the Unix kernel decades ago), the device drivers and the kernel are real-time capable.

Device drivers respond to hardware events (interrupts) and the kernel, in turn, can perform actions based on these events.

So, yes, while it's true that certain real-time features are not available to applications, if you have the capability of writing a device driver, you can circumvent this limitation by moving your application logic into a specialised device driver or kernel module.

(Of course it has to make logical sense to do that...)

Have I missed something? Does anyone disagree with this?

russellr
  • 58
  • 1
  • 8
  • 1
    Your argument seems to be: handle the event in the kernel instead of userspace, and then you have a *"realtime system"*. *"Have I missed something?"* -- Yes, try defining "realtime system" that is accurate. *"Does anyone disagree with this?"* -- Yes, but am I qualified to disagree with you? FWIW I have also *"written Unix device (& nexus) drivers and worked on the Unix kernel decades ago"*, SunOS to be specific, as well microkernels. – sawdust Aug 17 '20 at 23:13
  • 1
    Try again...Thanks for your comment. "try defining "realtime system" that is accurate". Do you agree with this definition? "A Real Time OS provides fixed time guarantees to applications, without buffering delays". If you agree, then clearly Linux is not a Real Time OS. So my point is that if you're happy to move some of your logic into a kernel module (or device driver) then you can definitely use Linux for your real time requirements. Agreed? – russellr Aug 19 '20 at 00:10
  • 1
    (1) *"Guarantees"* for what, anything? What is *"buffering delays"*? (2) No, I don't agree. Maybe some trivial response action can be incorporated into the kernel, but that will not always be practical for a more general case. If floating point unit or file access is needed, then you're advocating overburdening the kernel. Just because you can come up with one simplistic scenario to use Linux like a RTOS does not make Linux suitable as a RTOS in a more general sense. – sawdust Aug 19 '20 at 22:11

0 Answers0