LITMUS^RT: Linux Testbed for Multiprocessor Scheduling in Real-Time Systems

LITMUSRT 2007 Series

NOTE: This web page discusses an older version of LITMUSRT. Please use the current version unless you have specific interest in the 2007 series.


The LITMUSRT project is a soft real-time extension of the Linux kernel with focus on multiprocessor real-time scheduling and synchronization. The LITMUSRT 2007 series is based on Linux 2.6.20. The Linux kernel is modified to support the sporadic task model and modular scheduler plugins. Both partitioned and global scheduling is supported. The last release of the 2007 series, LITMUSRT 2007.3, includes plugins for the following scheduling policies:

The last 2007.X release of LITMUSRT occurred on 01/28/2008.


The LITMUSRT 2007 development effort was supported by grants from Intel Corp., IBM Corp., The National Science Foundation (grant CCR 0615197), and The U.S. Army Research Office (grant W911NF-06-1-0425).


The LITMUSRT project is led by Dr. James H. Anderson.

LITMUSRT 2007 was implemented by students of the Real-Time Systems Group at the University of North Carolina at Chapel Hill:


The source code of LITMUSRT is made available as open source under the terms of the GNU General Public License (GPL).

The third and last version of the LITMUSRT 2007 series was released on 01/28/2008. It consists of our Linux kernel modifications in the form of a patch against Linux 2.6.20, liblitmus, the user-space API for real-time tasks, and libso, a library for shared objects that provides synchronization primitives suitable for real-time tasks.

Please note that theses implementations are prototypes with certain limitations. Most notably, it is not secure in a multiuser context, i.e., real-time system calls do not require superuser privileges. Further, some resources (e.g. semaphores) that should be dynamically allocated are allocated statically.

Older releases:


LITMUSRT 2007.3 consists of an extension of the Linux kernel that adds support for the sporadic task model, a scheduler plugin infrastructure, and some scheduler plugins, as well as two user-space libraries that provide the LITMUSRT real-time API. Note, that the current implementation only works on the Intel x86 architecture.

Patching the Kernel

The extension to the Linux kernel is released as a patch against Linux 2.6.20. To install the LITMUSRT kernel, first download the Linux kernel 2.6.20 and untar it in a directory of your choice (hereafter referred to as $DIR). Second, apply the LITMUSRT patch (see Section Download) and configure, compile, and install the kernel as usual. The patch is -p1 applicable. To summarize, the LITMUSRT kernel can be obtained, patched, and compiled with the following commands:

cd $DIR
# get Linux 2.6.20
tar xjf linux-2.6.20.tar.bz2
mv linux-2.6.20 litmus-rt
# apply the LITMUS RT patch
cd litmus-rt
patch -p1 < ../litmus-rt-2007.3.patch
# create a working kernel configuration with HZ=1000
make gconfig
# compile the kernel
make bzImage
make modules
# proceed to install kernel, build initrd, etc.

After the kernel has been compiled and installed, the boot-loader must be configured to load the desired real-time scheduler plugin at boot time (run time selection of the real-time scheduler is currently not supported). The real-time scheduler plugin is selected with the rtsched kernel parameter.

rtsched= {linux, pfair, part_edf, global_edf, 
          global_edf_np, edf_hsb, gsn_edf, psn_edf, adaptive}

For example, on our test machine, we use the following GRUB entry:

title  Kernel 2.6.20-LITMUSRT
root   (hd0,5)
kernel /boot/vmlinuz-2.6.20-LITMUSRT root=/dev/sda6 ro vga=791 rtsched=gsn_edf
initrd /boot/kernel-2.6.20-LITMUSRT.img


The two user-space libraries, liblitmus and libso, provide their own makefiles and thus are easy to compile. The kernel interface for real-time tasks is provided by liblitmus, which can be compiled as follows:

cd $DIR
tar xzf liblitmus-2007.3.tgz
cd liblitmus 

The second library, libso, provides shared object and synchronization support for real-time tasks. It depends on liblitmus and must be installed in "parallel" (they must have the same parent directory). The following commands will obtain and compile libso, including the test programs:

cd $DIR
tar xzf libso-2007.3.tgz
cd libso
make tests

Please refer to the documentation on how to use the LITMUSRT real-time API as provided by libso and liblitmus.


Most of the documentation has yet to be written. To get an overview of the architecture of the kernel extension, we recommend to read the paper “LITMUSRT: A Status Report”.

The user space library that provides the LITMUSRT API, liblitmus, contains two example real-time tasks (base_task.c and base_mt_task.c) that both illustrate how to use the API and provide a skeleton for real-time task development. To get started with development, take a look these example programs.

Please contact bbb[AT] if you have any questions.


Valid XHTML 1.0 Strict

Linux is a registered trademark of Linus Torvalds.
The LITMUSRT logo was designed by Jasper McChesney of Primeval Designs.
Web design by Björn Brandenburg.