Mario Charest wrote:
“Igor Kovalenko” <> kovalenko@attbi.com> > wrote in message
news:blftj1$br1$> 1@inn.qnx.com> …“Armin Steinhoff” <> a-steinhoff@web.de> > wrote in message
news:blemc6$edn$> 1@inn.qnx.com> …Mario Charest wrote:
[ clip …]Many people I talk to think of QNX6 as a Linux with a 8000$ price
tag…
With the kernel version 2.6 of LINUX (includes some of the ‘low latency
patches’ and ‘kernel preemption patches’) … that’s the case in some
extent >
To some extent indeed. The NPTL is a huge improvement over the unfamous
linux threads, but still not quite suitabe for hard realtime. They now (in
2.6) have fast mutexes (futexes) but still no priority inversion controlfor
them. If you signal a condvar, there’s no guarantee it will wake up the
thread with highest priority. Calls to control scheduling behavior exist,
but have no effect. Also the kernel preemption patch was found to be
improving average latencies, but not the worst case (I’ve seen claims that
the worst case jitter on 2.4 kernel with preemption patch applied is the
same as on stock RedHat, which is 100,000us).
Ok you are talking main/official kernel line. What about distribution by
people like Monta Vista who seems to tweek the kernel for real-time.
playing devil’s advocate
Monta Vista has been using rtsched which is canceled now in favor of
official O(1) scheduler from 2.6 kernel. More details can be found at
http://www.mvista.com/pro/realtime.html and
http://sourceforge.net/forum/forum.php?forum_id=180207
If Monta Vista’s Linux will be based on O(1) then all problems described
by Igor are inherited.Since O(1) is not “very” real-time I expect mvista
to come up with a new “hard real-time” kernel twist.
If you write a classic producer/consumer example and benchmark it, it will
run much slower on Linux than QNX. How much slower would depend on
architecture and syncrhonisation method but it would be significant
difference (about 2x to 4x on 2.6 kernel I think - haven’t tried that
version yet).So Linux is getting there, but they have a way to go yet. Most of the
problem really comes from the fact that principal developers have no much
interest in realtime behavior. They optimize things for average case, not
for the worst (and those optimisations tend to be mutually exclusive).
Things on realtime front get done by sidekicks and they always are limited
by what amount of determinism the kernel allows, because nobody wants to
stray too much from the mainline - that would kill the business case for
using Linux kernel in the first place.– igor
\