LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-09-2013, 03:35 AM   #1
saman_artorious
Member
 
Registered: Sep 2008
Posts: 78

Rep: Reputation: 1
preemptive and real time kernel


I am running kernel
Code:
3.5.0-23-generic #35~precise1-Ubuntu SMP
on my system. I tested a c++ program and measured the completion time of it which was 420 ms. I want to know whether this execution time might even reduce more if I configure the kernel as real time and preemptive.
I think all kernels above 2.6 are configured as preemptive by default.

If enabling some flags in .config would reduce the execution time, I would thank if you could clarify those flags for me.

Furthermore, I also thank if someone could note the difference between real time and preemptive to me.

Best,
 
Old 10-09-2013, 07:20 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
A realtime kernel really only gives you predictable performance, not necessarily high performance. You might have more luck tying your process to a specific cpu with numactl and dedicating another cpu to handle interrupts.

I know you're not running RHEL but there's a good tuning guide here that you should get some value out of.
 
Old 10-10-2013, 08:47 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
Also bear in mind that the completion-time of a program includes all of the "set-up and tear-down" time. Reading files, finding and loading from libraries, initialize everything, do the work, and then tear everything back down. That's quite a bit of one-time overhead.

What you probably want to be measuring is how long the process is actually "doing the work," and you want to set things up so that it is able to "do the work" repeatedly during its lifetime.

A traditional, pre-emptive kernel like Linux is designed to give "good and consistent" performance no matter what happens. To be fair.

A real-time kernel, on the other hand, is designed to guarantee (as much as such things can be guaranteed) that the system will, say, respond to a particular interrupt within X microseconds and pass control to a particular process within Y microseconds. Predictably. And, such that you can dedicate an entire CPU and maybe an entire motherboard to doing "nothing but that." (A traditional pre-emptive OS is often used, on another motherboard connnected to it, to "feed and care for" the RTOS, providing a user-interface to it and relieving it of all other duties.
 
  


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
Slackware64 14.0, real time kernel, no real time as user. Linux.tar.gz Slackware 10 03-24-2013 06:41 AM
[RTAI] Can POSIX real time signals result in soft real time? Aquarius_Girl Linux - Newbie 0 04-21-2012 05:14 AM
real time kernel not real time, still xruns in Jackd browny_amiga Linux - General 0 09-20-2009 02:47 PM
LXer: Real-time garbage collection with Real-time Java LXer Syndicated Linux News 0 05-05-2007 12:16 PM
LXer: Real-time Linux gains real-time JVM LXer Syndicated Linux News 0 10-12-2006 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 09:00 PM.

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