Linux - Embedded & Single-board computerThis 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.
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.
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.
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.
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.
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.