MontaVista experts develop new approach to real-time Linux

Experts at MontaVista Software in Sunnyvale, Calif., are pursuing a new approach to bringing real-time functionality to Linux by improving system response times.

By John McHale

Experts at MontaVista Software in Sunnyvale, Calif., are pursuing a new approach to bringing real-time functionality to Linux by improving system response times.

They are doing this instead of creating a separate kernel to perform real-time functions similar to the work done by experts at FSM Labs in Socorro, N.M., on their RTLinux kernel.

MontaVista officials believe that about 90 percent of the potential real-time Linux market — the other 10 percent is application-specific areas covered by FSM Labs — is primed for what they call enhanced or preemptive Linux, claims says Bill Weinberg, director of marketing at MontaVista.

Many applications that require some type of real-time functionality can benefit from an embedded Linux system that has strong response times such as MontaVista's Hard Hat Linux, Weinberg says. Weinberg says the company is focusing on improving the response time of Hard Hat Linux to between 150 and 300 microseconds. Currently it is slightly faster than 1 millisecond, he says.

"Many, if not all, embedded applications have some sort of real-time performance requirement, write Weinberg and MontaVista president and chief executive officer Jim Reddy in a company white paper.

Many of the real-time requirements of embedded systems prove to be "soft," which means they miss a deadline once in a while. It does not adversely affect the overall system viability, they write. "Even when 'hard' real-time deadlines do exist, the scope of deterministic response can be reduced to the driver level or overcome by the 'real-fast' performance offered by combining Linux with Pentium and PowerPC silicon."

Usually when developers choose Linux for an application, real-time concerns take a back seat, according to the white paper. Weinberg and Reddy write that they should not. They claim in the paper that Linux, while a general-purpose operating system developed for desktops and servers, "enjoys a promising future in real-time designs.

Weinberg and Reddy write that "two primary paths exist to providing a real-time Linux: by inserting a second kernel into the system, and by refining the standard Linux scheduler and tuning Linux device drivers. The first approach, which has also been applied to Windows NT, presumes that to use Linux for real-time, you must first 'throw it out'.

"The addition of a second operating system, regardless of its putative real-time characteristics, vastly complicates both the development and run-time considerations of the embedded Linux developer," the authors continue. "The second operating system introduces a second set of RTOS-specific APIs; the loss of Linux process and threads programming model; a 'flat' memory model without benefit of memory protection; starvation of applications running in the 'normal' Linux environment; and unnecessary stratification of Linux applications and drivers into ill-defined non-real-time and real-time classes.

"A much more sensible approach is to optimize the existing, open Linux code base to address the needs of actual applications, but first to characterize the performance of standard versions of Linux," Weinberg and Reddy explain in their paper.

"Before even attempting to enhance Linux responsiveness, it is key to measure its real-time performance, thoroughly, in terms familiar to real-time/

embedded designers: worst-case interrupt latency, context switch, and maximum blocking times," they write. "Simply knowing how well Linux will respond on a particular platform in many cases obviates the need for additional re-architecting."

Linux currently has "superior compute and networking performance throughput, even when compared to supposedly lightweight [real-time operating system products, implying good to excellent average response times, even under load," Weinberg and Reddy claim in their paper. "Expect such measurements to be published in the coming months, by MontaVista Software and others.

"Developers whose requirements exceed such real-time characterizations in terms of the Linux kernel itself, need not despair," the MontaVista authors state. "On-going work by engineers at MontaVista software and elsewhere in the open-source community continues to refine overall performance and promises to offer greater determinism in both the kernel and interfaces."

MontaVista engineers also recently announced the immediate availability of tools that streamline porting of legacy VxWorks code from Wind River Systems in Alameda, Calif., to a Linux platform. With the new MontaVista tools, developers can reap the benefits of moving to an open-source platform without the massive engineering burden usually associated with such a move, MontaVista officials claim.

"We are offering developers the shortest path to successful deployment," Reddy says. "Designers are no longer tied to one-vendor, proprietary solution, bound to the past by the difficulties involved in porting to a new, open-source platform. This tool is a declaration of independence."

Earlier this year, MontaVista bridged the gap between proprietary and open-source embedded platforms with a pSOS-to-Linux tool kit that enables prototyping and ports pSOS-based applications to Hard Hat Linux, MontaVista officials say.

For the past decade, proprietary embedded executives like VxWorks have been a mainstay of embedded design, MontaVista officials say. Today's developers, however, are looking to take advantage of 32-bit and 64-bit processors, leveraging features like on-chip memory management for greater reliability and extensibility, as well as being able to run thousands of existing applications.

The MontaVista tool kit presents applications with a VxWorks 'virtual machine' that implements key system calls and behaviors of the VxWorks kernel on a standard Linux platform.

More in Computers