Archive Index (1999-2012) | 2013-current at | About  
Follow LinuxGizmos:
Twitter Google+ Facebook RSS feed

MontaVista unveils transparent real-time scheduler for Linux

May 4, 2000 — by LinuxDevices Staff — from the LinuxDevices Archive
Share this: Tweet about this on TwitterGoogle+Share on FacebookShare on LinkedInShare on RedditPin on Pinterest

Sunnyvale, Calif — MontaVista Software has unveiled a new real-time scheduler add-on for the Linux kernel. The real-time scheduler is meant to allow embedded applications to meet real-time performance requirements while preserving the standard Linux programming model and Applications Programming Interfaces (APIs). The scheduler works transparently, with the result that NO new programming techniques are necessary to gain measurable real-time task performance improvement.

Unlike other real-time Linux add-ons like RTLinux, RTAI, etc.), the real-time scheduler approach does not consist of adding a second (real-time) kernel underneath Linux. Nor does it substitute a so-called “Linux compatible” RTOS or real-time microkernel for the Linux kernel itself (e.g. QNX, LynxOS, etc.). Instead, the MontaVista real-time scheduler is basically a kernel patch that integrates into the standard Linux kernel at build time, in order to provide enhanced real-time task prioritization that coexists with — but preempts, when appropriate — the already-present “real-time” scheduling policies of Linux.

Looking under the hood

The MontaVista scheduler, which executes before the standard Linux scheduler, optimizes Linux process/thread scheduling by only examining and dispatching the highest priority real-time entity that is ready to run. Unlike the Linux scheduler, overhead for process selection is fixed, yielding extremely high performance. When no real-time entity is available for execution, or none has been specified as real-time, then scheduling falls through to the standard Linux scheduler and fairness-based scheduling proceeds normally.

Linux is a multi-process operating system, that is, it can perform multiple tasks at the same time. The methods used to choose which of numerous tasks to perform at a given moment in time greatly impact system performance. The off-the-shelf Linux kernel employs a mixture of strategies to govern program scheduling and execution, and great care is taken to ensure that all waiting tasks are given a chance to run. Such a policy is required in general purpose and server systems to ensure that no program is starved, and that maintenance and logging tasks can do their jobs.

Many embedded applications, especially those involving machine control or processing of high-speed data streams, require more stringent guarantees that key software will execute in response to external events or will generate constant frequency output. Such “real-time” applications must observe performance deadlines, and the underlying OS kernel may need to stop the currently executing program and initiate execution of another in as little as a few milliseconds (thousandths of a second) or in some cases in a few tens of microseconds (millionths of a second).

The MontaVista scheduler helps to ensure this kind of responsiveness by exerting control prior to the standard Linux scheduler, invoking hard (fixed) execution priorities to achieve improved soft (statistical) scalable real-time response. The MontaVista real-time scheduler is implemented as a Linux kernel configuration option, and does not disable standard Linux scheduling and fairness policies when no real-time process/thread is available to run.

Importantly, gaining a real-time performance benefit from using the real-time scheduler requires NO changes, whatsoever, to Linux programming techniques. All that is necessary is to use the standard Linux real-time priority options provided within its POSIX function calls. The real-time scheduler transparently enhances the real-time performance of those tasks that have been identified as having real-time performance requirements.

What doesn't it do?

One limitation of the real-time scheduler approach, according to MontaVista Software vice-president of engineering Kevin Morgan, is that it does not address the response-time latencies that can occur when Linux processes disable interrupts. By contrast, RTLinux intervenes to prevent Linux and Linux tasks from actually disabling interrupts, resulting in a “virtual disabling of Linux interupts” whereby system interrupts remain enabled so the system can continue to respond to real-time events in a timely manner, yet acts as though interrupts are disabled from the perspective of non-real-time processes.

Whether this distinction between the RTLinux approach and the real-time scheduler approach is significant is a matter of individual system requirements, according to Morgan. MontaVista has developed benchmarking and characterization tools that allow developers to actually measure system performance and determine if the real-time event responsiveness of the real-time scheduler approach is sufficient.

Note that MontaVista also offers RTLinux as an optional extension to Hard Hat Linux, for applications where the additional real-time capabilities provided by RTLinux are appropriate.

Immediately Available, including Open Source

For additional information and for unrestricted download of source packages and documentation, visit the download area, here. A whitepaper, entitled “Linux for Real-Time Systems: Strategies and Solutions,” is located here.

About MontaVista Software, Inc.

MontaVista Software Inc., founded in 1999 by real-time operating system pioneer James Ready, delivers open-source software solutions for the worldwide embedded software market. MontaVista's principal offering is the Linux operating system tailored for embedded software applications. MontaVista products include Hard Hat Linux, a standard off-the-shelf binary distribution of Linux for x86, PowerPC, StrongARM, MIPS, and other microprocessor architectures. Hard Hat Linux is supported by a comprehensive tool suite including optimizing compilers for C, C++, and other languages; high-level language debuggers; and performance monitoring tools. The company's Subscription Plans also provide Linux support, porting, and customization services to customers worldwide. MontaVista headquarters are in Sunnyvale, Calif., in the heart of the Silicon Valley.

Related story:

MontaVista Partners with FSMLabs for RTLinux

This article was originally published on LinuxDevices and has been donated to the open source community by QuinStreet Inc. Please visit for up-to-date news and articles about Linux and open source.

(advertise here)

Comments are closed.