PREEMPT-RT vs RTAI etc Explained ?

More
09 Dec 2020 18:49 - 09 Dec 2020 20:46 #191516 by deanforbes
PREEMPT-RT vs RTAI etc Explained ? was created by deanforbes
I have had a bit of a scratch around and am not sure, and cant see a clear explanation I may not be looking in the right places

What are the differences and when or why would you use one or the other are the questions, I am looking to answer?
Last edit: 09 Dec 2020 20:46 by deanforbes.

Please Log in or Create an account to join the conversation.

More
09 Dec 2020 19:13 - 09 Dec 2020 19:15 #191521 by PCW
Replied by PCW on topic PREEMPT-RT vs RTAI etc Explained ?
RTAI and Preemt-RT systems are different in that RTAI has a
separate dedicated real time kernel that runs the Linux kernel as a task
so its a 2 kernel approach to real time. Preempt-RT patches
the standard Linux kernel to provide real time response, so its a
1 kernel approach.

RTAI tends to have lower latency so is often better for LinuxCNC
systems that do software stepping, encoder counting, PWM generation etc.
(parallel port based LinuxCNC systems for example)

Preempt-RT tends to have higher latency (though not always) so is better
for systems that have external hardware for high speed interfaces. Also
Preempt-RT is required for certain hardware like Mesa Ethernet connected
cards or EtherCAT devices.
Last edit: 09 Dec 2020 19:15 by PCW.
The following user(s) said Thank You: chimeno, deanforbes, JohnnyCNC, macsddau@linuxcnc, JPL

Please Log in or Create an account to join the conversation.

  • macsddau@linuxcnc
  • macsddau@linuxcnc's Avatar
  • Offline
  • Premium Member
  • Premium Member
More
09 Dec 2020 22:00 - 09 Dec 2020 22:01 #191537 by macsddau@linuxcnc
Replied by macsddau@linuxcnc on topic PREEMPT-RT vs RTAI etc Explained ?

[...]RTAI has a
separate dedicated real time kernel that runs the Linux kernel as a task
so its a 2 kernel approach to real time. Preempt-RT patches the standard Linux kernel[...]

If I understand, one is the reverse of the other :
  • Linux kernel is patched into RTAI kernel
  • Preempt-RT is patched into the Linux kernel
So that RTAI has the priority to linux Kernel. Is that why it is better ?
Last edit: 09 Dec 2020 22:01 by macsddau@linuxcnc.

Please Log in or Create an account to join the conversation.

More
09 Dec 2020 22:55 #191541 by PCW
Replied by PCW on topic PREEMPT-RT vs RTAI etc Explained ?
I would not worry about patching as its just a way to merge source code

RTAI has a minimal low latency kernel for real time tasks
and Linux is run as a low priority task under the real time kernel
Real time applications running RTAI must run in kernel mode

Preempt-RT modifies the Linux kernel so it supports real time
even for userland applications
The following user(s) said Thank You: tommylight, macsddau@linuxcnc

Please Log in or Create an account to join the conversation.

  • andypugh
  • andypugh's Avatar
  • Away
  • Moderator
  • Moderator
More
27 Sep 2022 18:22 #252875 by andypugh
Replied by andypugh on topic PREEMPT-RT vs RTAI etc Explained ?
As a complication to this, you can run the (normal) user-space LinuxCNC application on an RTAI kernel if you install the linuxcnc-uspace-rtai helper application.

That currently _doesn't_ work with Mesa Ethernet hardware, though.

Please Log in or Create an account to join the conversation.

More
27 Sep 2022 21:00 #252891 by JPL
Replied by JPL on topic PREEMPT-RT vs RTAI etc Explained ?

RTAI and Preemt-RT systems are different in that RTAI has a
separate dedicated real time kernel that runs the Linux kernel as a task
so its a 2 kernel approach to real time. Preempt-RT patches
the standard Linux kernel to provide real time response, so its a
1 kernel approach.

RTAI tends to have lower latency so is often better for LinuxCNC
systems that do software stepping, encoder counting, PWM generation etc.
(parallel port based LinuxCNC systems for example)

Preempt-RT tends to have higher latency (though not always) so is better
for systems that have external hardware for high speed interfaces. Also
Preempt-RT is required for certain hardware like Mesa Ethernet connected
cards or EtherCAT devices.
 

Just my .02$ 

I really think that this should be added verbatim on the download page. This is so much easier to understand than what is currently written there, especially for new users.

 
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

  • andypugh
  • andypugh's Avatar
  • Away
  • Moderator
  • Moderator
More
27 Sep 2022 22:24 #252895 by andypugh
Replied by andypugh on topic PREEMPT-RT vs RTAI etc Explained ?

I really think that this should be added verbatim on the download page. This is so much easier to understand than what is currently written there, especially for new users.


When did you last look at the download page? I updated it a few days ago for the 2.8.4 release.

Please Log in or Create an account to join the conversation.

More
28 Sep 2022 06:08 - 28 Sep 2022 06:15 #252915 by JPL
Replied by JPL on topic PREEMPT-RT vs RTAI etc Explained ?
Andy, I've looked at it. The problem is that most of us 'newbie' are coming from the windows world and know very few things about linux, if anything.

When I read something like "“linuxcnc-uspace” is compatible with the preempt-rt realtime kernel, which is close to standard Linux. This version runs in userspace like most other applications and will run with any preempt-rt kernel."  This raise more questions than answers:

What is the preempt-rt kernel?
standard linux? (is there a non standard linux???)
what is userspace?
And the big question: WHY is that important???
...
While the text on the download page is technically rich and correct it could be VERY hard to completely understand by anyone who is not deeply familiar with linux. It's simply a level higher than most new users are able to comprehend, which is in part why I can read so many places that linuxcnc is difficult to learn (or at least more difficult than some 'competitor') 

The text from PCW is talking to the average guy that doesn't know much beyond the basics, it is clear and give direct answer to questions like which one is the fastest or which one do I need with Mesa card without going 'too deep' into technical 'jargon'. The text on the download page is certainly excellent and needed for a deeper understanding of linux and linuxcnc but I think can be too 'technical' for any newbie.

But again, I really don't want to diminish the work you've done. This place is plain fantastic and I've never seen any other place where there's so many people willing to help. This is invaluable. The only thing that I think is missing is the basics ABC to get started with linuxcnc.

(With the utmost respect for your work) 



 
Last edit: 28 Sep 2022 06:15 by JPL.

Please Log in or Create an account to join the conversation.

  • andypugh
  • andypugh's Avatar
  • Away
  • Moderator
  • Moderator
More
29 Sep 2022 21:38 #253054 by andypugh
Replied by andypugh on topic PREEMPT-RT vs RTAI etc Explained ?
Maybe we need:

TLDR: Download this ISO file and install it....

Please Log in or Create an account to join the conversation.

More
30 Sep 2022 01:08 - 30 Sep 2022 01:13 #253071 by JPL
Replied by JPL on topic PREEMPT-RT vs RTAI etc Explained ?
Nah, I don't think there's such a thing as too much information. My past experiences (I was a teacher for a while) is just telling me that the easy stuff should always be put first then the complicated stuff (explanation) after it. The average brain will just stop learning after reading a few concepts that are 'out of range'. Threshold vary among individual but best way to keep people engaged is to first KISS.

Maybe simply put this text first:
Warning: Spoiler!


Then the text that was previously above it would go after it. But at this point users will already had the essential info and not 'scared away'

 
Last edit: 30 Sep 2022 01:13 by JPL.

Please Log in or Create an account to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum