LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
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


Reply
  Search this Thread
Old 05-29-2012, 05:54 AM   #1
elico
Member
 
Registered: Dec 2011
Posts: 145

Rep: Reputation: Disabled
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
 
Old 06-15-2012, 03:23 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
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.
 
Old 10-04-2012, 01:48 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
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/
 
Old 10-04-2012, 01:56 PM   #4
elico
Member
 
Registered: Dec 2011
Posts: 145

Original Poster
Rep: Reputation: Disabled
Thanks
Eliahu
 
Old 10-05-2012, 07:20 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.
 
Old 10-06-2012, 09:34 AM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,927
Blog Entries: 45

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,
Quote:
Originally Posted by elico View Post
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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A question about real time linux aixilin Linux - Newbie 1 03-16-2009 07:36 AM
LXer: Real-time Linux gains real-time JVM LXer Syndicated Linux News 0 10-12-2006 10:54 AM
LXer: Real Time Coming to Linux Real Soon LXer Syndicated Linux News 1 08-23-2006 06:30 PM
real, real, real, basic computer for my Mom shengchieh General 3 12-18-2005 12:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 11:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration