Papers On Real-Time And Embedded Linux 102
An anonymous reader writes "LinuxDevices has once again published the proceedings of the annual Real-Time Linux Workshop. This one, the seventh, was held in France earlier this month, at the University for Science and Technology of Lille (USTL). The papers span a range of topics, from fundamental real-time technologies to applications, hardware, and tools. Enjoy!"
Re:what about a complete embedded linux distributi (Score:5, Informative)
This has already been modded as a troll, but giving you the benefit of the doubt, do you mean something different from things like Monta Vista [mvista.com] or Lynuxworks [lynuxworks.com] ?
Of course, it's also worth mentioning that "real time" doesn't necessarily mean "fast." In fact, rather the opposite is typically true: a real-time system must (by nature) make the worst case predictable -- but often compromises the average performance to do so.
--
The universe is a figment of its own imagination.
Real time interpreted languages (Score:2, Interesting)
More info on real-time java https://rtsj.dev.java.net/ [java.net]
Real-time java? Talk about your oxymorons (Score:3, Informative)
In the worst case, you have to know exactly how many time (accurate to the length of a CPU cycle) it will take for a section of code to be executed or know exactly how long it will take an interrupt to vector to your interrupt handler.
I'll be Java timing isn't even consistent from one JVM release to the next for the same code running on the same computer.
Re:Real-time java? Talk about your oxymorons (Score:3, Informative)
While Java and real-time may seem like hard to integrate it is possible and it has been done (successfully). Eg I've seen demonstrations of RT systems runnning on industrial robots which balanced inverted pendulums without a problem.
Now naturally timing may differ between architectures, that's to be expected. What's important is that if you have a specific architecture you need to know, exactly, what delays occur and that they have upper
Re:Real-time java? Talk about your oxymorons (Score:1)
This was undiplomatic at best. If you know something better than someone else... then just explain to them where they're mistaken. There's no need to be an lemur's ass about it.
Re:Real-time java? Talk about your oxymorons (Score:5, Insightful)
I'm not an expert in RT java, but I've written code with required timing accuracy to 1 cpu cycle which I think qualifies me quite well to comment on RT issues.
"What's important is that if you have a specific architecture you need to know, exactly, what delays occur and that they have upper bounds."
The issue isn't speed, it's accuracy. Hard RT systems have lower bounds as well as upper bounds. Being early is no better than being late.
"The same would be true with a Asm or C RT system"
Sure, but the difference is that in Java you have another layer to deal with so determining the timing is more complex.
"The main reason you'd want to run Java RT is because first off, it's faster to write correctly."
This is a matter of opinion even for conventional programs. For a RT system, I think you have the burden of proof for this claim.
Re:Real time interpreted languages (Score:4, Interesting)
Despite the claims of "Write Once Run Anywhere", my experience with Java has been rather the opposite -- that writing portable Java is (as a rule) even more difficult that writing portable C or C++. It's nice that the portable GUI library is part of the spec instad of an add-on like wxWidgets, but from a practical viewpoint has little real effect on portability. That may be mostly a matter of the kinds of code I write though -- some people certainly seem to find it a lot more useful than I have so far.
Warning: I hadn't previously looked at the RT Java spec (at least that I recall) so these comments are based on looking at it for no more than an hour or so.
In this case, it looks like portability may be even more difficult than usual -- for one thing, it allows raw access to physical memory. Though the functions involved allow the system to throw exceptions when/if this is abused, at least at first glance it looks like an obvious point of attack on such a system.
Maybe I'm reading it incorrectly, but the introduction section of the specification seems to imply that this is basically intended as a set of extensions to a normal (non-RT) Java environment, that would (in turn) normally be running on top of a non-RT OS. It appears that while it allows predictability of scheduling of one thread vs. another within the JVM, little or nothing is implied about the scheduling of the JVM vs. other processes on the system. From the looks of things, the system could be implemented on top of a non-RT OS, in which case the RT applications would run, but RT response would be more or less accidental. Given the nature of a JVM, that may be difficult (at best) to prevent though.
Finally, looking through the project web page, the only implementation I find mentioned is the reference -- this may imply that even though the spec is now over 4 years old, it has seen little or no real use. That isn't necessarily a major criticism, but it doesn't seem like a ringing endorsement either. Maybe I'm just getting old and cynical, but it strikes as being a bit like DPMI 1.0: a nice spec, but I'm not yet convinced it'll ever really mean a whole lot.
--
The universe is a figment of its own imagination.
Amazing Field of Work (Score:5, Interesting)
Re:Amazing Field of Work (Score:4, Interesting)
For traditional embedded systems (i.e extremely limited resources or true real-time software) these OS's will come up short. They are too bloated for low resources systems and their timing is to variable for serious real-time work.
Of course, most of today's microprocessors aren't appropriate for hard real-time software either. Once you add complicated prefetch schemes and caches to the mix, you can't really do anything that requires fine timing precision.
Fortunately for traditional OS's, real-time software is a dying art and most real-time work is done in specialized hardware rather than software these days. In addition, the resource issue is not really much of a problem these days.
Re:Amazing Field of Work (Score:3, Informative)
You are wrong (Score:3, Insightful)
Re:You are wrong (Score:2)
Re:You are wrong (Score:1)
Fair enough, it might be more microcontrollers than microprocessors. I was a bit unprecise when I wrote the comment.
Software in cars? What do you call airbags, anti-lock brakes, traction control, which are all controlled by software, if not hard real-time! The move towards drive-by-wire would not be easy without hard real-time software as well. Fly-by-wire as implemented in Airbus airplanes are all hard real-time. Then we have GSM/3G communication networks, all using rea
Re:You are wrong (Score:2)
A single microcontroller in car probably represents less than
Re:Amazing Field of Work (Score:1, Insightful)
Linux. (Score:3, Funny)
Re:Linux. (Score:2, Funny)
I tought you never had used linux.... xD
Re:Why Linux? (Score:1)
At least, that's the sole intention of the GPL, as far as I know.
Re:Why Linux? (Score:1)
Re:Why Linux? (Score:2, Insightful)
Re:Why Linux? (Score:2)
Re:Why Linux? (Score:5, Interesting)
systems dont need anything like an os at all.
Re:Why Linux? (Score:2)
The problem with a simple loop is that you often end up with timing relationships between functions that are really arbitrary ("Function A occurs on every interrupt. Let's make function B happen every 10 times function A occurs by having it run once every 10 loops. That's probably about right"). Then you find out that later that you need to change the timing for function A and now the timing for function B is off.
When of the main benefits of an RTOS is modularizing time. The only
Re:Why Linux? (Score:2, Insightful)
I recently installed FreeBSD 6.0 on my laptop.
It sucks.
No cpu scaling in the kernel [even with cpufreq], the ports tools are shit compared to gentoo, etc.
I'm not saying Linux distros are perfect but Gentoo is way more functional and easier than FreeBSD. I don't know what the other distros are like but sucks to their asmar!
Tom
Re:Why Linux? (Score:1)
Re:Why Linux? (Score:2)
I don't see a political reason why Gentoo is "teh evil" and it's technically very capable.
Therefore boo BSD, yeah gentoo.
Tom
Re:Why Linux? (Score:2)
Having installed FreeBSD on various hardware, from desktops to laptops, I cannot say that I have run into such a problem. CPU scaling works well with both FreeBSD 5.x and FreeBSD 6.0 on the systems that I have that support it.
And the FreeBSD ports system is far superior to the Gentoo equivalent. Take some time to learn how to use it effectively.
Re:Why Linux? (Score:5, Interesting)
O RLY?
Gentoo: emerge -UD gaim
FreeBSD: cd
Yeah that's SOOO superior.
Gentoo uses mirrors for fetching files. BSD apparently doesn't [I couldn't fetch mplayer because the primary server was down].
Gentoo uses bash, BSD uses csh [WHY!!! OH WHY!!!]
Try installing more complicated packages like latex, I installed all of the laTeX* packages and I still didn't have a "latex" command.
As for cpu scaling, it's an AMD XP-M laptop with ACPI based PST entries. with "cpufreq" loaded the cpu runs at the full speed of 1.8Ghz regardless of idle time. In Gentoo Linux [well just linux 2.6.x] scaling works and the cpu idles at 530Mhz.
Agreed I didn't use it for long but I just don't see the appeal OVER gentoo. I mean Gentoo can be a server OS just the same as BSD. In fact, I've built quite a few live HTTP, SMTP, POP, IMAP, NIS, DNS servers from it. I'm sure BSD is up there but it lacks polish. People bitch that gentoo is hard to use, how is BSD any better when it's even harder to use?
Gentoo ain't perfect [nor is the Linux Kernel] but for the most part it works a lot more than it fails [being that all of my computers run it]. I think it's good that BSD distros exist because it provides diversity in case for instance, Linux blows up.
All I'm saying is FreeBSD requires some serious userspace polishing.
Tom
Re:Why Linux? (Score:2)
Voila, a full LaTeX install. If you like installing everything from source, that is. On most ports, I don't want to bother tuning them, so I tell portupgrade to install from a binary package if one is available (it usually it), using this command:
Much more convenient if you're in a hurry, on slow hardware, or both.
Free and OpenBSD also have the best documentat
Re:Why Linux? (Score:1)
Most ports have multiple mirrors. Some don't. Looking at the MPlayer port, it's listing 10 mirrors. Maybe you didn't wait long enough for the first to time out.
Gentoo uses bash, BSD uses csh [WHY!!! OH WHY!!!]
Because csh is the traditional BSD default shell. Don't like it? Use bash then.
As for cpu scaling, it's an AMD XP-M laptop with ACPI based PST entries. with "cpufreq" loaded the
Re:Why Linux? (Score:5, Insightful)
Re:Why Linux? (Score:2, Insightful)
Re:Why Linux? (Score:1)
Re:Why Linux? (Score:2)
I think the real purpose of putting this in the GPL is to sucker people into GPLing their own code. If you create something really useful internally and GPL fanatics get wind of it, you can bet t
Re:Why Linux? (Score:2)
Yeah, like Google, who runs a custom Linux kernel. Sure would be nice to get ahold of that. You don't hear anybody clamoring for it and claiming to have rights to it now do you?
Re:Why Linux? (Score:2)
Yes, I'm sure Google has put the word out that they have a custom Linux kernel and it's really, really great. I doubt that it has broad appeal or that it does something nobody else can do.
Re:Why Linux? (Score:2)
You ar
Re:Why Linux? (Score:3, Insightful)
Re:Why Linux? (Score:2)
I agree fully.
That is why I support developers who aid others in their quest for achieving Zen by releasing the code as GPL and thus ensuring that more people will stop hoarding knowledge in their irrational possessiveness. Hopefully this will bring about a better world filled with cuddly teddybears for everyone.
Re:Why Linux? (Score:2)
Just because they didn't contribute patches doesn't mean they didn't contribute. Just the warm feeling of knowing what you wrote became something so much more is nice in itself.
Re:Why Linux? (Score:2)
Just because Microsoft managed to sneak their operating system in at the right moment doesn't mean that they deserve credit for the IBM PC revolution. As the name suggests, it was IBM who first started building standardised desktops and letting others in on the standards in question. Microsoft's one innovation was their refusal to exclusively license the DOS variant they acquired to IBM, thus opening the way for OS stand
Re:Why Linux? (Score:2)
This is revisionist history. It took years for other vendors to be able to clone the non-OS part of the PC. It would have taken many more years to make a viable clone if the vendors had not been able to buy the OS from MS.
IBM introduced the PS/2 computer line (with its proprietary Micro Channel bus architecture) specifically to gain back the market share lost to the clones.
Re:Why Linux? (Score:2)
"Just because IBM were the first to start building standardised desktops and letting others in on the standards in question[0] doesn't mean they deserve credit for the PC revolution."
Look, Microsoft had a significant part to play in the ascendence of the PC. So did IBM. So did Compaq. Certainly, any other company that just happened to have the same products, at the same t
Re:Why Linux? (Score:2)
Because those better alternatives provide more freedom for Microsoft to take the code
I thought we were talking about embedded systems here. Just how is Microsoft going to dig the code out of the device? They're going to have to want it very, very badly.
Re:Why Linux? (Score:2)
Re:Why Linux? (Score:2)
However, in context, there's still the remnants of a point amidst the scattered detritus of my idiocy (note: idiot, not shill). This was an academic gathering not an industry event, so any code probably would be passed around and tinkered with (this sort of thing is where the FOSS movement came from, of
Re:Why Linux? (Score:2)
Re:Why Linux? (Score:1)
Re:Why Linux? (Score:1)
Re:Why Linux? (Score:2, Interesting)
Re:Why Linux? (Score:2)
You're wrong. Not all improvements to Linux will be available since not all of the modified code is distributed. No BSD code can every be taken away, only the private modifications people make.
I think this "improvements" argument isn't a very strong one anyway. I'll bet that most of them will never appear in a major distribution.
Re:Why Linux? (Score:5, Insightful)
Because Linux has a much bigger developer comunity and you can get commercial support targeted at embedded development from several vendors. Giving better freedom getting developer resources.
And the GPL "trap" as you call it, does not really matter even in embedded development. The interesting part of the product, or the part you may want not to GPL, will reside in userspace anyway making the GPL of the kernel irrelevant.
Re:Why Linux? (Score:2)
Re:Why Linux? (Score:2)
Re:Why Linux? (Score:2)
Philisophically, You are an ass. Embedded are Developers are Developers first, Linux Developers Second, Embedded Linux Developers third. Except for the few that are being trained by GreenHills and VX, most embedded Linux guys used to be Linux Guys.
I don't know if you have heard, but we like to share. We like our products to live and grow. We like to create flexability and freedom.
But, I say freedom you say IM
Re:Why Linux? (Score:1)
uCLinux is free as are most tools required to develope for it. Most RTOS vendors ask a pretty he
not really key area for linux (Score:5, Informative)
Embedded systems usually don't have need to carry that much memory. Task specific operating systems like TRON and its variations take only few kilobytes, and are extremely efficient and reliable in what they do.
What linux provides, is interesting approach, but it also rises the price tag with hardware specs higher than the cheapest alternatives.
Re:not really key area for linux (Score:1)
Re:not really key area for linux (Score:3, Interesting)
Re:not really key area for linux (Score:3, Insightful)
Re:not really key area for linux (Score:2, Insightful)
I wouldn't say that Linux is a desktop-intended kernel. It certainly didn't start out that way, and wasn't intended to.
Many of the distributions are intended for the desktop. And many are intended to be run as servers. And a fair few are intended to be run in embedded systems.
The Linux kernel has a lot of developers working on making it suit their specific needs. In this way, it can be all things to most people and most things
Re:not really key area for linux (Score:3, Insightful)
For the umpteenth time: embedded != small
Sure, a digital camera is an embedded device, but so is an MRI scanner.
Re:not really key area for linux (Score:2)
ofcourse really tiny devices that have less memory than pocketpc's should choose probably something else to operate on. linux is getting more complicated each day to support new h
Re:not really key area for linux (Score:2)
If you want a cheap Linux handheld, I can thoroughy recommend the Nokia 770 (rubbish name, great product). The developer environment is available for download, and it runs a fully open stack (Linux, X1
Re:not really key area for linux (Score:2)
Re:not really key area for linux (Score:1)
And from wikipedia:
Re:not really key area for linux (Score:3, Informative)
However in the latest ESP survey it was found 24% said they were using linux 17% said they were likely to use it soon and 33% said it was likiely they would use it. That shows that Nearly 75% with an interest in linux. Not bad fo a non focussed market.
ALso the biggest embedded OS provider(vxworks 22%) are pushing linux hard as a complementry solution to there flagship product.
So I would say linux has a
Good Books on the Subject (Score:2)
Re:Good Books on the Subject (Score:1)
Re:Good Books on the Subject (Score:3, Informative)
For the most part I think you'll learn the most just reading through the databooks and application notes that come with the particular embedded platform that you are working on. Stay FAR away from any hobby-type embedded systems books that focus on PIC processors if you are doing anything serious. I've found a lot of the code in those types of books to be poorly written and counter productive. Since most embedded systems are progr
Re:Good Books on the Subject (Score:1)
Wow, I'm Impressed? (Score:2, Interesting)
RT applications are said to be so because of the requirement for them to react in *real time* even though that is not the actual case. It just needs to seem that they do.
Microprocessors and full fledged desktops or servers have different tasks, different design criteria. You may want to know as soon as an email arrives, but you damn sure want to know when your cars brakes are about to fail. There are differences in the meaning of 'real time' in these
Re:Wow, I'm Impressed? (Score:5, Interesting)
QNX [qnx.com] isn't a Linux derivative. It's not even a UNIX derivative. It's a POSIX-compliant microkernel, with a totally different underlying architecture than Linux. Latency is much better than Linux, because the kernel just handles message passing, CPU dispatching, and timing - everything else, like file systems, drivers, and networking, is in user space and preemptable. Overall performance is slightly worse than Linux.
The newer real-time Linux variants based on the 2.6 kernel are getting to be decent. 2.6 finally got most of the long interrupt lockouts out of the kernel, and allowed preemption of some kernel tasks. Look at the MonteVista or BlueCat variants. You still have to be careful not to load any drivers that contain long interrupt lockouts, or real-time latency will go way up.
The original "RT Linux" was a hack which basically allowed running your real-time application as a loadable kernel module, like a driver. That's basically a dead end at this point in time.
QNX, unfortunately, was acquired by a larger company, which has changed the business strategy from opening up QNX to raising prices and cutting functionality of the base package. The main architect of QNX died a few years ago, and things really haven't been the same since. It's sad.
Re:Wow, I'm Impressed? (Score:3, Informative)
No, device drivers in QNX are in 100% in user space. I've written one, for FireWire cameras. Manual page here. [overbot.com]
QNX device drivers can have the privilege of mapping device memory into their address space, but they're still user-level programs. I've developed hardware drivers on a running QNX system without rebooting.
Re:Wow, I'm Impressed? (Score:1)
Sad to hear that they have been acquired and dumbed down. QNX was a very cool system. I was involved in a beta program for their lightweight X-windows knockoff Photon, and I seem to remember the president of the company occasionally chiming in on the message boards. Good times.
Funny though. The world was supposed to be all microkernels and RISC processors by now. Just not the case. Linux on PowerPC is a pretty cool thing
Re:Wow, I'm Impressed? (Score:5, Insightful)
I suppose I'll get modded as troll (again) for saying so, but from what you've said, I'd guess you're one of the people who's not an RT programmer.
Real-time programs do need to react in real time. A typical example is that the program needs to react within X microseconds of an interrupt happening. A hard real-time requirement is exactly that -- no "seem that they do" about it. For example, a navigation system for an aircraft must react within the right amount of time to input from the pilot, radars, etc. A late reaction carries the possibility of killing hundreds of people (conceivably even thousands with particularly bad luck about where it lands).
Every system has some delay -- the questions are 1) how much?, and 2) how much does it matter if it misses its window by some small amount? A hard real-time system is one where you have an absolute maximum delay, and you must never miss it. A soft real-time system is one where you may be able to get away with slightly greater delays on rare occasion -- the "softness" of the real time being determined largely by how large the delay can be, and how often it can happen. The situations above with brakes or aircraft navigation are about as hard of real-time as you can get -- excessive delay is likely to cause deaths. A router or mail server has substantially softer requirements. If it misses receiving part of a packet very often, it won't work well -- but as long as it's not very often, it's probably not a problem, and endangering lives is pretty far-fetched even at worst.
Also note that real-time does not necessarily mean much about being fast. Years ago, I worked on some software to control some of the operations in a sewage plant. In most cases, the computers' requirements on the reaction times were measured in entire seconds and sometimes even minutes -- but if it missed a deadline, millions of dollars in damage could be expected, and endangering lives was possible as well. Ridiculously slow by most standards, but hard real-time nonetheless.
So -- the essence of real-time is not about "high speed" it's about "dependable and predictable speed". Real-time requirements are specified not only in terms of "How fast?", but "How serious is too slow a reaction?" -- and the latter is often what really dominates.
--
The universe is a figment of its own imagination.
Re:Wow, I'm Impressed? (Score:2, Insightful)
I though the traditional definition of a real-time was a system that had temporal requirements as well as functional requirements. That is, it should perform the operation as specified and at the right time.
Also, real-time system does not need to be small. There are real-time systems that run Pentium processors with several GHz, it's all
Re:Wow, I'm Impressed? (Score:2)