DIAPM-RTAI

(Dipartimento di Ingegneria Aerospaziale, Politecnico di Milano - Real Time Application Interface)

A Hard Real Time support for LINUX

  
to RTLinux home page
  

History and motivation for a Real Time Application Interface (RTAI)

It all started with a variant to NMT_RTLinux that grew out of the need of having a periodic scheduler to enhance efficiency in control applications, when one can work with a basic period and integer multiples of it. In fact the original RTLinux release had just a oneshot timer that, while very flexible in getting close to microsecond timing resolutions, required much overhead in keeping the clock time and in being reprogrammed. That is related to the use of the 8254 timer, which is connected to the ISA bus, that is becoming more and more a dragging weight in relation to the CPU power of today's PCs. Moreover the initial release had no real time support functions, i.e. semaphore, timing functions, messages etc., and that made impractical the implementation of relatively complex control applications requiring a few cooperating tasks.
Ironically at some time we found ourselves in the need of using oneshot precise heterogeneous timers to implement PWM control systems at medium frequencies that, if done within the RTLinux tasks, would have allowed much more flexibility than an hardwired implementation. Again however the original release maintained his architecture and its overhead remained excessive. So we implemented the oneshot timers in a different way by using the CPU TSC (Time Stamp Clock) with far great efficiency, but with earlier than Pentium machines, and compatibles, no more usable.
Another important reason for a variant was the fact it solved the problem of a bug free FPU support that , for some time, has been lacking in the official release.
Right now the official RTLinux has solved most of these problems and has a periodic timer too, along with semaphores and mailboxes. However the oneshot timing is still less efficient.
With the releases for Linux 2.2.xx we went back to what we were thinking before RTLinux appeared, i.e. develope  Real Time Hardware Abstraction Layer (RTHAL)  and a Real Time Application Interface (RTAI) that would make Linux usable for hard real time application.
Unfortunatly kernel 2.0.25, on which we were working was to much unclean in design, for the idea we had in mind.  Thus  we were lucky that people at NMT introduced RTLinux, as it gave us the possibility of gradually learning about the kernel and its relation to the hardware.
So when 2.2.xx appeared to have a cleaner interface to the hardware we could go back to our original idea, but with a somewhat more deeper understanding of what was behind. For other motivations of RTAI see the files INSTALL and README in the rtai distribution.