| Linux - Kernel This forum is for all discussion relating to the Linux kernel. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-01-2007, 12:26 PM
|
#1
|
|
LQ Newbie
Registered: Feb 2005
Posts: 3
Rep:
|
Help with deciding Linux capability for Real-Time application
Hello Everyone,
I had noticed a few threads on Real-time application on Linux, but felt that i must start a new thread regarding the question in mind.
Background information --->
I am working on robotics with vision. I interface with the robot using an interface box, provided by the manufacturer. The communication takes place between the interface box and computer over a CAN bus. (The manufacturer chose to use CAN as the communication medium).
The interface box sends the robot current status information in two packets with a gap of 20ms. So at time T ms it sends Status (1st half of complete status) and at (T+20)ms it sends Status (2nd half of complete status). Then it sends a third packet requesting any use input, i.e asks to provide a new velocity profile or new position information that robot needs to move in. The robot waits for the entire duration of 20ms to accept the information. After this the above sequence repeats.
On my Linux box, I need to run three things
1. CAN Communication routine which runs every 20ms or when i need to send the new status information to the robot.
2. A high level control algorithm (runs for less than 1ms)
3. Image processing. This takes a lot of computational resources and needs to run all the time on the computer and be preempted when the CAN communication routine or the control routine run
Now I wondering if this would be classified as a hard real-time or a soft real-time system. In either case, could anyone suggest possible Linux distributions to use. Will a general desktop Linux distribution be able to handle the time constraints and computational requirements in this application?
I was thinking of using RTLinux. Could anyone suggest if they have worked on a similar thing, what they have done. I am traditionally from Windows background but have some working experience with Linux. But done very little programming on Linux.
One of the problems that I faced when using the Windows machine is that, it does not preempt the Image processing routine in time and runs for nearly 40ms and more before relinquishing control to the CAN communication routine. I am sure there could be ways for doing it on Windows, but could anyone provide me the Linux alternative.
Any suggestions would be greatly appreciated!!
Thanks everyone
Best Regards,
Suraj.
|
|
|
|
03-03-2007, 03:45 PM
|
#2
|
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,479
Rep: 
|
I think it could be done on a normal Linux distribution, but I'd rather recompile the kernel with some real-time patches (but not necessarily RTLinux, which would handle the task without a doubt, BTW). The communication stuff can be split: the controlling part running as a high priority process (maybe some kernel module) and the visualization as a normal program. With priorities set correctly, the image processing will be preempted just as desired.
20ms is just 50times/second what is not that much. The question is about delays, which I think will not harm that.
|
|
|
|
03-03-2007, 04:24 PM
|
#3
|
|
LQ Newbie
Registered: Feb 2005
Posts: 3
Original Poster
Rep:
|
Thank you Mara,
Could you suggest some other some real-time patches on Linux that can be used instead of RT-Linux.
I guess a simple multi-threaded application would give the required performance. What do you think. In past while some other people who have worked on similar stuff seemed to have used two different computers. I made a quick search for them on google, but there are so many options that pop up, could you suggest some from your experience that I could you use.
Thank you,
Best regards.
|
|
|
|
03-04-2007, 01:44 PM
|
#4
|
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,479
Rep: 
|
Start with http://people.redhat.com/mingo/realtime-preempt/
But one important note: also look into the standard kernel options (like the one setting HZ), they also make difference.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:01 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|