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

Dr. James H. Anderson & Students, The University of North Carolina at Chapel Hill

about - support - collaborators - publications - download - installation - documentation

About

The LITMUSRT project is a soft real-time extension of the Linux kernel with focus on multiprocessor real-time scheduling and synchronization. The Linux kernel is modified to support the sporadic task model and modular scheduler plugins. Both partitioned and global scheduling is supported. In the current version (2007.2), plugins for the following scheduling policies are included:

The latest public release of LITMUSRT occurred on 10/29/2007.

Support

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

Collaborators

The LITMUSRT project is led by Dr. James H. Anderson. The implementation effort is carried out by students of the Real-Time Systems Group at the University of North Carolina at Chapel Hill:

Publications

Download

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

The latest version of LITMUSRT is 2007.2 and was released on 10/29/2007. 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 the current implementation is a prototype 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 in the current version.

Old releases:

Installation

The current release of LITMUSRT, version 2007.2, 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
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2
tar xjf linux-2.6.20.tar.bz2
wget http://www.cs.unc.edu/~anderson/litmus-rt/download/litmus-rt-2007.2.patch
mv linux-2.6.20 litmus-rt
# apply the LITMUS RT patch
cd litmus-rt
patch -p1 < ../litmus-rt-2007.2.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

Libraries

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
wget http://www.cs.unc.edu/~anderson/litmus-rt/download/liblitmus-2007.2.tgz
tar xzf liblitmus-2007.2.tgz
cd liblitmus 
make

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
wget http://www.cs.unc.edu/~anderson/litmus-rt/download/libso-2007.2.tgz
tar xzf libso-2007.2.tgz
cd libso
make
make tests

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

Documentation

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”.

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

Valid XHTML 1.0 Strict