Real Time Linux -- applications and use

E-mail from a toaster? Linux domination in the flight-simulation market by 2001? Phil Wilshire says that it's all possible with Real Time Linux (RT-Linux), an extension to Linux that handles time-critical tasks.

You wouldn't trust bio monitors in hospitals that are running Windows; that, Wilshire cracked, would add new meaning to the blue screen of death. Or high-reliability data collection such as hurricane monitoring; because nature doesn't put on a replay of hurricanes, you need an OS that never crashes -- like Linux.

In RT-Linux, a small hard-realtime kernel and standard Linux kernel share one or more processors. Thus, the system can be used for realtime applications such as data acquisition, control, and robotics, while still enjoying full Linux functionality.

Wilshire showed two demonstrations with RT-Linux: a simple graphic display of a scope that changes when you input a signal, and a floating magnetic ball that remained suspended because of the RT kernel's ability to react within a specified period of time to realtime processes. In the first example, Wilshire showed RT processing every 100 microseconds, signal generator output every 100-1000 ms, a signal generator controller, a click-on button to produce sine wave, an analog signal viewer, and a digital signal viewer -- all tools available for free.

Encouraged by the number of techies in the audience, Wilshire went through code samples in detail. He also provided some code tips -- most important, he said that you want to decouple the code and make the graphics work without the RT layer, and the RT controls work without the hardware-simulation package. You should use the control and hardware layer and allow for the control to work in the user space for debugging and testing. Also, use shared memory as often as possible.

The future of RT systems is moving toward both embedded and large systems. Linux embeds very well, and many development tools (such as XEmacs) and good debuggers are available. Most important, Linux has a controlled development path. As Wilshire said, [Linux] is not about "we want to sell our handheld stuff, so we're going to cut the capability of our embedded, big-time stuff."

RT-Linux does have limitations; tasks run outside of a normal kernel, so as the kernel is preempted, you can't do any kernel stuff other than schedule a task -- ultimately, you can't use many kernel resources. You also can't create or destroy things yet.

Wilshire ended with a plea to Linus Torvalds to put some RT capability in the kernel -- not that it's absolutely necessary, but to make RT programming easier. Wilshire supposedly has word from Torvalds that he'll fiddle around with the task scheduler.

About the Author

Mana Tominaga works for Fawcette Technical Publications, where she covers Windows developer tools for the print magazines JavaPro, Enterprise Development, and Visual Basic Programmers Journal, and online for http://www.devx.com.

Join the newsletter!

Error: Please check your email address.

More about Real Time Linux

Show Comments

Market Place