Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome. |
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-29-2012, 05:54 AM
|
#1
|
Member
Registered: Dec 2011
Posts: 145
Rep: 
|
Basic question linux for real time
Hi all
I just finished a EMBEDDED SYSTEMS PROGRAMMING , we learned
programming of bare metal boards like ARDUINO and LINUX based
boards as well .
My question is : what is the benefit of LINUX to real time
based solutions ?
Why real time is not done with regular C programming
like in the case of ARDUINO ?
Please explain with some detal and examples .
Thanks
Elico
|
|
|
06-15-2012, 03:23 AM
|
#2
|
Senior Member
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
|
The benefit of Linux in a real-time environment is the same as any operating system; a scheduler, memory management, file systems, device drivers, libraries, applications and so on. For many projects, it is not reasonable to replicate all of this work.
Certainly there are smaller embedded applications that can be implemented from scratch. And there are alternative systems and libraries that are more suitable for systems that have hard real-time constraints.
Last edited by neonsignal; 06-16-2012 at 07:19 AM.
|
|
|
10-04-2012, 01:48 PM
|
#3
|
Moderator
Registered: Aug 2002
Posts: 26,799
|
In some regards this question is similar to your other thread. As stated all the hard work of I/O programming is part of the operating system and so it saves time.
Regarding your second question of real time programming requires strict timing constraints and c compilers typically can not optimise the code satisfactory to meet the those requirements. Those sections of the program must be written using assembly.
http://www.linuxquestions.org/questi...ed-4175429706/
|
|
|
10-04-2012, 01:56 PM
|
#4
|
Member
Registered: Dec 2011
Posts: 145
Original Poster
Rep: 
|
Thanks
Eliahu
|
|
|
10-05-2012, 07:20 PM
|
#5
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
Linux is not real-time.
You can still program in C under Linux, of course. What you cannot do is access real hardware from C in userspace (or from any other language). The kernel has exclusive right to access or grant access to hardware. Most real-time OS's are not so heavily protected, and often do not use any protected memory or MMU. Limiting the ability to access hardware directly in application code reduces the feasibility of providing real-time performance.
You can always load your own bare-metal code onto a system intended to run a full-on OS. Of course, you would lose the benefit of ready-made drivers, filesystems, multi-tasking, etc.
--- rod.
|
|
|
10-06-2012, 09:34 AM
|
#6
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,979
|
Hi,
Quote:
Originally Posted by elico
Hi all
I just finished a EMBEDDED SYSTEMS PROGRAMMING , we learned
programming of bare metal boards like ARDUINO and LINUX based
boards as well .
My question is : what is the benefit of LINUX to real time
based solutions ?
Why real time is not done with regular C programming
like in the case of ARDUINO ?
Please explain with some detal and examples .
Thanks
Elico
|
Look at this paper from IBM for real time linux;
Quote:
Summary: It's not that Linux® isn't fast or efficient, but in some cases fast just isn't good enough. What's needed instead is the ability to deterministically meet scheduling deadlines with specific tolerances. Discover the various real-time Linux alternatives and how they achieve real time—from the early architectures that mimic virtualization solutions to the options available today in the standard 2.6 kernel.
This article explores some of the Linux architectures that support real-time characteristics and discusses what it really means to be a real-time architecture. Several solutions endow Linux with real-time capabilities, and in this article I examine the thin-kernel (or micro-kernel) approach, the nano-kernel approach, and the resource-kernel approach. Finally, I describe the real-time capabilities in the standard 2.6 kernel and show you how to enable and use them.
|
You can get more papers from IBM, one that does address/provide some useful info: Real-Time Linux Kernel Characteristics
Be sure to look at the parent article: Installing and using real time Linux
HTH!
|
|
|
All times are GMT -5. The time now is 12:34 AM.
|
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
|
|