|
  |
  |
  |
    |
|
  |
|
           
Extreme 6   Using Empress in the IntroductionEmpress RDBMS have many characteristics which makes it an excellent fit for real-time systems, such as: small footprint, fast performance, near zero maintenance, fast learning curve, ease of integration, rapid application development, etc. In RTLinux environment Empress RDBMS is used as a full blown Linux implementation. Hence, it will give all the benefits of Linux features to real-time application developers. What is RTLinux?RTLinux is a hard real-time operating system that runs real-time tasks as threads (i.e. real-time applications written using RTLinux API) and a Linux operating system as its lowest priority execution thread. All the operations/processes which Linux itself runs are non-real time and hidden in a way from RTLinux. Developers of RTLinux made it possible that real-time threads and interrupt handlers are never delayed by non-real-time operations. Real-time tasks in RTLinux can communicate with Linux processes via shared memory or a file-like interface (FIFO). Thus, real-time applications can make use of all the powerful, non-real-time services of Linux, such as Empress RDBMS. Real-time tasks can be developed using a number of API calls (about 50), such as: rtl_hard_disable_irq rtl_hard_enable_irq rtl_no_interrupts rtl_request_irq rtl_restore_interrupts rtl_setclockmode rtl_stop_interrupts ...
"
RT-Linux is simple, providing only a bare minimum of functionality
necessary for implementing a real-time system. But this simplicity
is to the system designer's benefit. You want to implement the bulk
of the application in Linux processes because Linux itself is
solid, stable, and popular with a lot of desktop users-so you know
you can get help if you have trouble. Real-time tasks should have
only the functionality necessary to perform real-time I/O and pass
data to and from the Linux processes. The simplicity of RT-Linux
has two advantages: first, its very simplicity makes it less likely
that it will be buggy and second, if you do find a bug, it's
likely to be easy to find and fix. These factors are important.
Because real-time systems are a minuscule portion of Linux
applications, the amount of help you can find for developing code
using RT-Linux is certain to be low. So a feature-rich RT-Linux is
not necessarily something to be desired. The functionality now
implemented is also sufficient for the vast majority of real-time
systems if properly used" [2].
Empress in RTLinux EnvironmentEmpress Software follows the basic idea on how the applications should be run on RTLinux. Empress application will run as Linux application and communicate with real-time tasks via FIFO or shared memory. Figure 1. shows possible scenarios for Empress applications in order to communicate with real-time tasks.  
Figure 1. Empress in RTLinux Environment     Application developers can use any Empress C application interface (e.g. mr, mx, Embedded Static or Dynamic SQL, ODBC) to build an application which will communicate with hard real-time tasks. The idea behind RTLinux is to build Empress Linux applications in Linux environment and build simple hard real-time tasks using RTLinux API calls. Figure 2 shows an example based on RTLinux scheduling accuracy measuring example (created by Michael Barabanov - part of RTLinux package).  
Figure 2. Scheduling Accuracy Example    
The example consists of three components:
Empress Software Inc. has the above demo available on its FTP site. This example shows a possible way to integrate Empress application with real-time tasks. It could be used as a template for more generic " data streaming" situation. For example, a typical case would be a real-time data acquisition task which monitors/gathers data from instruments/gages/sensors. References[1] Michael Barabanov, Victor Yodaiken: " Real Time Linux" , Linux Journal, February 1997.
[2] Jerry Epplin: " Linux as an Embedded Operating System" ,
Embedded Systems Programming. [3] The Wikipedia page for RTLinux or http://en.wikipedia.org/wiki/RTLinux |