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.
The primary purpose of the LITMUSRT project is to provide a useful experimental platform for applied real-time systems research. In that regard, LITMUSRT provides abstractions and interfaces within the kernel that simplify the prototyping of multiprocessor real-time scheduling and synchronization algorithms (compared to modifying a "vanilla" Linux kernel). As a secondary goal, LITMUSRT serves as a proof of concept, showing that algorithms such as PFAIR can be implemented on current hardware. Finally, we hope that parts of LITMUSRT and the "lessons learned" may find value as blueprints/sources of inspiration for other (both commercial and open source) implementation efforts.
LITMUSRT is not a production-quality system, and we have currently no plans to turn it into one. LITMUSRT is not "stable," i.e., interfaces and implementations may change without warning between releases. POSIX-compliance is not a goal; the LITMUSRT-API offers alternate system call interfaces. While we aim to follow Linux-coding guidelines, LITMUSRT is not targeted at being merged into mainline Linux. Rather, we hope that some of the ideas protoyped in LITMUSRT may eventually find adoption in Linux.
The current version of LITMUSRT is 2010.1 and is based on Linux 2.6.32. It was released on 05/12/2010 and includes plugins for the following scheduling policies:
Please refer to the download and installation sections for details.
Earlier versions based on Linux 2.6.24 and Linux 2.6.20, which supported additional scheduling policies, are discussed on separate pages dedicated to the LITMUSRT 2008 and LITMUSRT 2007 series respectively.
The first version of LITMUSRT, which was implemented in Spring 2006, is based on Linux 2.6.9.
The LITMUSRT development effort is being supported by grants from AT&T, IBM, and Northrop Grumman Corps.; the National Science Foundation (grants CNS 0834270 and CNS 0834132); the U.S. Army Research Office (grant W911NF-09-1-0535); and the Air Force Office of Scientific Research (grant FA 9550-09-1-0549).
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:
Additional collaborators contributed to the previous LITMUSRT 2008 and the LITMUSRT 2007 versions.
B. Brandenburg and J. Anderson, “On the Implementation of Global Real-Time Schedulers”, Proceedings of the 30th IEEE Real-Time Systems Symposium, pp. 214-224, December 2009. Postscript. PDF. Longer version with all graphs: Postscript. PDF.
For reference, all evaluated plugins are provided as part of the following patch (against version 2008.3).
B. Brandenburg and J. Anderson “Reader-Writer Synchronization for Shared-Memory Multiprocessor Real-Time Systems”, Proceedings of the 21st Euromicro Conference on Real-Time Systems, pp. 184-193, July 2009. Postscript. PDF. Long version with blocking terms: Postscript. PDF.
J. Calandrino and J. Anderson “On the Design and Implementation of a Cache-Aware Multicore Real-Time Scheduler”, Proceedings of the 21st Euromicro Conference on Real-Time Systems, pp. 194-204, July 2009. Postscript. PDF.
M. Mollison, B. Brandenburg, and J. Anderson “Towards Unit Testing Real-Time Schedulers in LITMUSRT”, Proceedings of the Fifth International Workshop on Operating Systems Platforms for Embedded Real-Time Applications, pp. 33-39, July 2009. Postscript. PDF.
B. Brandenburg and J. Anderson, “A Comparison of the M-PCP, D-PCP, and FMLP on LITMUSRT”, Proceedings of the 12th International Conference on Principles of Distributed Systems, pp. 105-124, December 2008. Postscript. PDF.
B. Brandenburg, J. Calandrino, and J. Anderson, “On the Scalability of Real-Time Scheduling Algorithms on Multicore Platforms: A Case Study”, Proceedings of the 29th IEEE Real-Time Systems Symposium, pp. 157-169, December 2008. Postscript. PDF.
B. Brandenburg and J. Anderson, “An Implementation of the PCP, SRP, D-PCP, M-PCP, and FMLP Real-Time Synchronization Protocols in LITMUSRT”, Proceedings of the 14th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications, pp. 185-194, August 2008. Postscript. PDF.
Note: The work described in this paper took part in a branch that is currently not part of the main distribution. For reference, we provide the branch as a separate download:
Please don't use this version for active development. If you are interested in this work, it would be best to first port the desired features to a current version of LTIMUSRT and merge them into the main distribution.
A. Block, B. Brandenburg, J. Anderson, and S. Quint, “An Adaptive Framework for Multiprocessor Real-Time Systems”, Proceedings of the 20th Euromicro Conference on Real-Time Systems, pp. 23-33, July 2008. Postscript. PDF.
B. Brandenburg, J. Calandrino, A. Block, H. Leontyev, and J. Anderson, “Real-Time Synchronization on Multiprocessors: To Block or Not to Block, to Suspend or Spin?”, Proceedings of the 14th IEEE Real-Time and Embedded Technology and Applications Symposium, pp. 342-353, April 2008. Postscript. PDF.
Extended version, including all graphs: Postscript, PDF.
B. Brandenburg, A. Block, J. Calandrino, U. Devi, H. Leontyev, and J. Anderson, "LITMUSRT: A Status Report", Proceedings of the 9th Real-Time Linux Workshop, pp. 107-123, November 2007. Postscript. PDF.
B. Brandenburg and J. Anderson, "Integrating Hard/Soft Real-Time Tasks and Best-Effort Jobs on Multiprocessors", Proceedings of the 19th Euromicro Conference on Real-Time Systems, pp. 61-70, July 2007. Postscript, PDF.
J. Calandrino, H. Leontyev, A. Block, U. Devi, and J. Anderson, "LITMUSRT: A Testbed for Empirically Comparing Real-Time Multiprocessor Schedulers ", Proceedings of the 27th IEEE Real-Time Systems Symposium, pp. 111-123, December 2006. Postscript, PDF.
The source code of LITMUSRT is made available as open source under the terms of the GNU General Public License (GPL).
The current release of LITMUSRT is 2010.1. It consists of our Linux kernel modifications in the form of a patch against Linux 2.6.32 and liblitmus, the user-space API for real-time tasks, as well as ft_tools, a collection of tools used for tracing with Feather-Trace (which is part of the LITMUSRT patch).
Based on Linux 2.6.32. Released in May 2010.
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.
Older releases: LITMUSRT 2008 series, LITMUSRT 2007 series.
The current release of LITMUSRT 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 a user-space library that provides the LITMUSRT real-time API. Note that the current implementation only works on the Intel x86-32 and x86-64 architectures.
The extension to the Linux kernel is released as a patch against Linux 2.6.32. To install the LITMUSRT kernel, first download the Linux kernel 2.6.32 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.32 wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.tar.bz2 tar xjf linux-2.6.32.tar.bz2 wget http://www.cs.unc.edu/~anderson/litmus-rt/download/2010.1/litmus-rt-2010.1.patch mv linux-2.6.32 litmus2010 # apply the LITMUS RT patch cd litmus2010 patch -p1 < ../litmus-rt-2010.1.patch # create a working kernel configuration # - select HZ=1000 # - enable in-kernel preemptions # - disable NO_HZ # - don't use power management options like frequency scaling # - disable support for group scheduling make menuconfig # compile the kernel make bzImage make modules # proceed to install kernel, build initrd, etc. ...
When configuring the kernel, note that there is a menu (at the very end of the list) with LITMUSRT-specific configuration options. For reference, we provide sample 32-bit and 64-bit configurations that are known to work under QEMU.
The user-space library for real-time tasks, liblitmus,
depends on the LITMUSRT kernel kernel and provides its own build system (based on scons).
In order to compile liblitmus, you need to adjust the
variable LITMUS_KERNEL in the SConstruct file to point to your
copy of the kernel. Users should not update the SConstruct file manually anymore. Instead, a .config file can be created with appropriate variables. The required variables can be listed using scons -h command. This command lists the variables required for building the liblitmus2010 library.
Sample output of scons -h is as shown below.
scons -h scons: Reading SConscript files ... scons: done reading SConscript files. ============================================= liblitmus --- The LITMUS^RT Userspace Library There are a number of user-configurable build variables. These can either be set on the command line (e.g., scons ARCH=x86) or read from a local configuration file (.config). Run 'scons --dump-config' to see the final build configuration. Build Variables --------------- LITMUS_KERNEL: Where to find the LITMUS^RT kernel. ( /path/to/LITMUS_KERNEL ) default: ../litmus2010 actual: ../litmus2010 PYTHON_HEADERS: Where to find Python headers. ( /path/to/PYTHON_HEADERS ) default: /usr/include/python2.5 actual: /usr/include/python2.5 ARCH: Target architecture. (x86_64|sparc64|x86|i686) default: x86_64 actual: x86_64 WSS: Working set size for pm analysis default: 3072 actual: 3072 Use scons -H for help about command-line options.
To summarize, the liblitmus can be obtained and compiled with the following commands:
cd $DIR wget http://www.cs.unc.edu/~anderson/litmus-rt/download/2010.1/liblitmus-2010.1.tgz tar xzf liblitmus-2010.1.tgz cd liblitmus # set LITMUS_KERNEL in .config to point to the kernel source and compile scons
Please refer to the documentation on how to use the LITMUSRT real-time API as provided by liblitmus.
Unfortunately, most of the documentation has yet to be written. To get an overview of the architecture of the kernel extension, we recommend reading the paper “LITMUSRT: A Status Report”.
The kernel contains the following real-time scheduling policy implementations:
Only one policy can be active at any time. Initially (i.e., during and after boot), the "Linux" policy is active. You can use the tool showsched (part of liblitmus) to display the name of the currently active policy.
You can use the tool setsched (part of liblitmus) to select a new plugin at run time.
Only root can change the active policy, and only when there are no real-time tasks present.
If you do not have the dialog utility installed, then you can still use setsched by passing the desired scheduling policy as a commandline parameter, e.g. type setsched PFAIR to activate the PFAIR plugin.
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, please take a look these example programs.
LITMUSRT provides numerous tracing facilities that are discussed in-depth in the tutorial Tracing with LITMUSRT.
Please contact bbb[AT]cs.unc.edu if you have any questions.
Linux is a registered trademark of Linus Torvalds.
The
LITMUSRT logo was designed by Jasper McChesney of Break for Sense Design.
Web design by Björn Brandenburg.