About
ChronOS is an
implementation of distributable threads in
the Linux kernel, as a first-class abstraction for programming and
scheduling real-time, multi-node sequential behaviors. Distributable
threads first appeared in the Alpha
distributed real-time OS kernel,
subsequently in Mach
3.0
(a subset), and constitute the first-class programming and scheduling
abstraction
of the Real-Time
CORBA (Dynamic Scheduling)
Specification.
ChronOS provides APIs for programming with distributable threads
(similar to that of Real-Time CORBA), algorithms for the real-time
scheduling of distributable threads, a framework for plugging-in
application-specific real-time schedulers for scheduling distributable
threads, and time-critical protocols for
ensuring distributable thread integrity in the presence of failures.
Back to
top
Version
The current version of ChronOS is version 9.06. This is a Beta release.
The
version scheme is derived from Ubuntu (year.month). ChronOS
is based
on Linux kernel 2.6.24.7 and the real-time linux patch 2.6.24.7.rt27 (CONFIG_PREEMPT_RT).
ChronOS currently supports Real-Time CORBA's Case 2 scheduling model
and contains the following algorithms for scheduling distributable
threads:
- Fixed priority (RMS)
- Earliest deadline first (EDF)
- Dependent activity scheduling algorithm (DASA)
- Locke's best-effort scheduling algorithm (LBESA)
DASA and LBESA are described in Clark's PhD thesis
and Locke's PhD thesis
(CS Department, CMU),
respectively.
ChronOS contains the following distributable thread integrity
protocols:
- Thread Polling with Bounded Recovery (TPR)
- Decentralized Thread Polling with Bounded Recovery
(D-TPR)
TPR and D-TPR protocols are described in Curley's MS thesis
(ECE Department, Virginia Tech).
Back to
top
Download
ChronOS is available under GNU General
Public License (GPL version 2). The
current release (version 9.06) is available as a patch to Linux kernel
2.6.24.7. ChronOS consists of the following:
- Kernel patch that includes our modifications to the
linux kernel to include distributable thread implementation at the
kernel-level, thread
managment components, and real-time scheduling.
- A middleware service that enables
distributed
communication between different nodes for intra-distributable thread
communication.
- A middleware library
libdt.so
that provides user-level APIs for programming distributable threads.
Kernel
The ChronOS version 9.06 kernel patch can be downloaded from here.
Middleware
The ChronOS version 9.06 middleware can be downloaded from here.
Back
to
top
Installation
Kernel
ChronOS version 9.06 is based on kernel 2.6.24.7 and real-time kernel
patch
2.6.24.7-rt27.
- Click here
to download the 2.6.24.7 kernel from kernel.org
- Click here to download the 2.6.24.7
real-time patch from kernel.org
Download the kernel into a folder, let's call it /home/<username>/tmp.
Extract the kernel.
$ cd
/home/<username>/tmp
$ wget
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.7.tar.bz2
$ tar xjvf linux-2.6.24.7.tar.bz2
Rename the kernel to linux-2.6.24.7-rt27
$
mv linux-2.6.24.7
linux-2.6.24.7-rt27
Download the CONFIG_PREEMPT_RT patch and move
it inside the
kernel directory, and patch the kernel.
$
wget
http://www.kernel.org/pub/linux/kernel/projects/rt/patch-2.6.24.7-rt27.bz2
# Move the patch inside the kernel folder.
$
mv
patch-2.6.24.7-rt27.bz2
/home/<username>/tmp/linux-2.6.24.7-rt27
$
bzcat
./patch-2.6.24.7-rt27.bz2 | patch -p1
Download the ChronOS ver 9.06 kernel patch as described in the download section put it inside
the
kernel folder.
$
mv chronos-9.06-patch.tar.gz
/home/<username>/tmp/linux-2.6.24.7-rt27
$ tar zxvf chronos-9.06-patch.tar.gz
Compiling the kernel
Install the build essentials.
$
sudo apt-get install build-essential libncurses5
libncurses5-dev
The kernel should compile fine with gcc-4.3.
If you get any errors with
that, you can install gcc-3.4 and
create a symbolic link
to it. [optional]
$
sudo
apt-get install gcc-3.4
$ sudo ln -s /usr/bin/gcc-3.4 /usr/bin/gcc
Rename the kernel to chronos-9.06
$
mv linux-2.6.24.7-rt27 chronos-9.06
Go to the patched ChronOS kernel:
$
cd /home/<username>/tmp/chronos-9.06
$
make menuconfig
The kernel configuration menu would now come up:
- In the "Processor
type and features menu," make sure
that "Symmetric
Multi-processing support" is unchecked. (ChronOS currently
does not support multiprocessors; multiprocessor support will be
included in a future release.)
- In the "Preemption
Mode" menu, make sure that it is set
to "Complete preemption
(Real-time)"
Exit the menu and save the configuration file .config
$
make
NOTE:
If you have more than one core, make sure that you use the make
-j option
instead. You can:
$
make -j2
Once the kernel is compiled, install the modules into /lib/modules:
$
sudo make modules_install
Installing the kernel
Once the kernel is compiled, install the kernel:
$
cd /home/<username>/tmp/chronos-9.06
$ sudo cp arch/i386/boot/bzImage
/boot/vmlinuz-2.6.24.7-chronos-9.06
$ sudo cp System.map /boot/System.map-2.6.24.7-chronos-9.06
$ sudo cp .config /boot/config-2.6.24.7-chronos-9.06
$ sudo update-initramfs -c -k 2.6.24.7-chronos-9.06
$ sudo update-grub
ChronOS version 9.06 is installed.
Middleware and library
Download the ChronOS middleware source code package. Create a folder.
Let's call it /home/<username>/middleware.
Compile the
middleware service and the library:
$
cd /home/<username>/middleware
$ wget
https://filebox.vt.edu/users/piyushg/chronos-9.06/chronos-9.06-middleware.tar.gz
$ tar xzvf
chronos-9.06-middleware.tar.gz
$ cd chronos-9.06-middleware/middleware
$ make
$ sudo make install
The libraries and the headers are installed in /usr/local/chronos/lib
and /usr/local/chronos/include respectively,
while the middleware engine dtengine is
installed in
/usr/local/chronos/bin.
To clean the middleware use:
$
make clean
To un-install the middleware use:
$
sudo make uninstall
NOTE:
By uninstalling the middleware all the contents of /usr/local/chronos/ are
deleted.
Installing the remote services
The documentation section describes in detail about creating a remote
service and the configuration file. A sample service is provided inside
the middleware package that was downloaded in the last step.
$
cd chronos-9.06-middleware/service
$ make
$ sudo make install
NOTE: dtengine
depends on the dtservice.conf
and would fail if the
configuration file is not present.
Starting
dtengine
dtengine uses the underlying
network connection. However, on machines
which have more than one interface (eth0\eth1),
dtengine must be told
which interfaces are being used for distributable threads. ChronOS
would then use those interfaces to communicate with other nodes.
IMPORTANT:
Before starting dtengine, make sure that the
following exports are also
set:
$
export
PATH=/usr/local/chronos/bin:$PATH
$ export LD_LIBRARY_PATH=/usr/local/chronos/lib
# set the network interface (eth0 or eth1)
$ export DT_ETH_PORT=<interface>
These can be added to the .bashrc to avoid
setting these every time:
$
cd ~
$ vi .bashrc
# Add the exports to the end of the .bashrc file
Start the middleware engine:
#
confirm dtengine is on the path
$ which dtengine
/usr/local/chronos/bin/dtengine
# start the dtengine
# dtengine
NOTE:
- In ChronOS 9.06, the middleware has not been patched
into
/etc/init.d
services. Hence, the
middleware needs to be started manually
after every reboot. This would be made into a service in future
stable releases.
- In the current version of ChronOS, only
eth0
and eth1 are supported. A
more generic version would be available in future releases.
Back to
top
Documentation
ChronOS architectural stack
The middleware consists of the dtengine
and a library
called libdt.so. The dtengine
acts like a
background service which
takes care of remote calls from other nodes for invoking services
through the portable interceptor (PI).
In
order to use distributable threads, you need to
install ChronOS on a minimum of two nodes. Each node would host a set
of "services" that can be called by a distributable thread starting
from one node. A service is essentially a method (i.e., a procedure or
a function) that can be remotely invoked as part of a distributable
thread.
Creating (remote) services
The set of services (or methods) is kept in a library file that other
nodes
(i.e., machines running ChronOS) can remotely invoke as part of
distributable threads.
An example of a service library file looks like as follows:
#include
"dtapi.h"
int node1_service1 (dt_handle_t* handle, void *args)
{
/* service code */
return 0;
}
int node1_service2 (dt_handle_t* handle, void *args)
{
/* service code */
return 0;
}
The service library file must be kept
in /usr/local/chronos/lib/.
The services need to be described in a configuration
file called /usr/local/chronos/conf/dtservice.conf.
The dtservice.conf file has the required
information about the service:
;
This
is a config
file
NAME /usr/local/chronos/lib/libservice.so.1.0.1
TSER 2
FUNC node1_service1 node1_service2
ENDS
The configuration file has the following details:
NAME, the
name of the service
that has the services or methods
being hosted on the node.
TSER, the total number of methods in
the service
FUNC, the name of the methods
ENDS, the end of the section.
NOTE:
Currently, in ChronOS version 9.06, the name and path of the configuration
file is hard-coded and can't be changed and should be /usr/local/chronos/conf/dtservice.conf.
ChronOS runs a dt-nameserver inside the kernel which receives
information about the location of the services from other nodes.
When the middleware is started on each node, it broadcasts the services
to all other nodes. In the current beta version of ChronOS, the
middleware needs to be restarted every time the services/methods are
changed or updated so that the information is broadcast to every
other node.
A sample service along with a Makefile is available inside the
chronos-9.06-middleware.tar.gz .
APIs and System calls
The libdt.so provides the APIs that can be
used for programming with distributable threads:
int
dt_spawn
(dt_handle_t *handle, void (*function)(dt_handle_t*, void*), void
*args);
int dt_remote_invoke (dt_handle_t*, const char *name, void *args);
The header file /usr/local/chronos/include/dtapi.h
contains the
function prototypes and data structures.
Documentation about the middleware and how to create a test application
can be downloaded here.
dt_cancel, dt_pause, and real-time
scheduling functions are available but these are not fully
functional in
the current beta release.
These would be available in the future release.
Documentation about dt_cancel and dt_pause
are available here: user's
guide and programmer's
guide.
Documentation about real-time scheduling algorithms
implemented in ChronOS and how they can be extended can be downloaded here.
Documentation about thread integrity protocols
implemented in ChronOS are available here: user's
guide and overview.
Back to
top
Publications
Distributable threads
Distributable thread middleware
Distributable thread integrity protocols
- Recovering from Distributable Thread Failures in Distributed Real-Time Java, E. Curley, B. Ravindran, J. Anderson, and E. D. Jensen, ACM Transactions on Embedded Computing Systems (TECS), To appear
- Recovering from Distributable Thread
Failures with
Assured Timeliness in Real-Time Distributed Systems, Edward
Curley,
Master's Thesis, ECE Department,
Virginia Tech, Blacksburg, VA, USA, February 2007
- On Best-Effort Real-Time Assurances for
Recovering from Distributable Thread Failures, B. Ravindran,
E. Curley, J. Anderson, and E. D. Jensen, IEEE International Symposium on
Object and component-oriented Real-time distributed Computing (ISORC),
pages 344-353, May 2007
- Assured-Timeliness
Integrity Protocols for Distributable Real-Time Threads in Dynamic
Distributed Systems, B. Ravindran, E. Curley, J. Anderson,
and E. D. Jensen, International
Workshop on Embedded Software Optimization (ESO), IFIP International
Conference on Embedded and Ubiquitous Computing (EUC),
pages 660-673, LNCS, Volume 4809/2007,
Springer, December 2007
- Recovering from Distributable Thread
Failures with Assured Timeliness in Real-Time Distributed Systems,
E. Curley, J. Anderson, B. Ravindran, and E. D. Jensen, IEEE Symposium on Reliable
Distributed Systems (SRDS), pages: 267 - 276, October 2006
Distributable thread scheduling
- Consensus-Driven
Distributable Thread
Scheduling in
Networked Embedded Systems, J. Anderson, B. Ravindran, and E.
D.
Jensen, IFIP International Conference on Embedded and
Ubiquitous
Computing (EUC), pages 247-260, LNCS, Volume 4808/2007,
Springer, December 2007
- Scheduling
Distributable Real-Time Threads
in
Networked Embedded Systems in the Presence of Crash Failures and
Message Losses, S. Fahmy, B. Ravindran, and E. D. Jensen, ACM
Symposium
On Applied Computing (SAC), Track on Real-Time Systems,
pages 294-301, March 2008
- On collaborative scheduling of distributable
real-time threads in dynamic, networked embedded systems, S.
Fahmy, B.
Ravindran, and E. D. Jensen, IEEE International Symposium on
Object and
component-oriented Real-time distributed Computing (ISORC),
pages 485-491, May 2008
- Fast
Scheduling of Distributable Real-Time
Threads
with Assured End-to-End Timeliness, S. Fahmy, B. Ravindran,
and E. D.
Jensen, 13th International Conference on Reliable Software
Technologies
- Ada-Europe, pages 211-225, LNCS, Volume 5026, Springer,
June 2008 (full version of the paper is available
as a technical report)
- Scheduling Dependent Distributable Real-Time
Threads
in Dynamic Networked Embedded Systems, S. Fahmy, B.
Ravindran, and E.
D. Jensen, IFIP Working Conference on Distributed and
Parallel Embedded
Systems (DIPES), pages 171-180, Distributed
Embedded Systems: Design, Middleware, and Resources, B.
Kleinjohann, L. Kleinjohann, and W. Wolf (editors), Springer, Volume
271, September 2008 (full version of the paper is available
as a technical report)
- On Distributed Real-Time Scheduling in
Networked Embedded Systems in the Presence of Crash Failures,
B. Ravindran, J. Anderson, and E. D. Jensen, IFIFP Workshop on Software
Technologies for Future Embedded and Ubiquitous Systems (SEUS), IEEE
ISORC, May 2007
- Probabilistic, Real-Time Scheduling of
Distributable Threads Under Dependencies in Ad Hoc Networks,
K. Han, B. Ravindran, and E. D. Jensen, IEEE Wireless Communications and
Networking Conference (IEEE WCNC), pages 2253-2258, March
2007
- Exploiting Slack for Scheduling Dependent,
Distributable Real-Time Threads in Mobile Ad Hoc Networks, K.
Han, B. Ravindran, and E. D. Jensen, International Conference on
Real-Time and Network Systems (RTNS), pages 225-234, March
2007
- RTG-L: Dependably Scheduling Real-Time
Distributable Threads in Large-Scale, Unreliable Networks, K.
Han, B. Ravindran, and E. D. Jensen, IEEE Pacific Rim International
Symposium on Dependable Computing (PRDC), pages 314-321,
December 2007
Back to
top
People
The ChronOS project is led by Prof. Binoy Ravindran at Virginia
Tech.
Students of Virginia Tech's Real-Time Systems
Laboratory are leading
different aspects of the implementation effort:
- Matthew Dellinger
- Piyush Garyali
- Caleb Hopkins
- Surjyadipta Shome
Contact Piyush Garyali (piyushg@vt.edu)
or Prof. Ravindran (binoy@vt.edu)
for installation problems, questions or comments.
Back to
top
|