Real Time Application Interface(RTAI) Presented By Debjyoti Basu(IT/2008/34) Soumya Sarkar(IT/2008/14)
What is RTAI?• Real-Time Application Interface (RTAI) is a real-time Linux implementation• It adds a small real-time kernel below the standard Linux kernel.• RTAI provides a large selection of inter-process communication mechanisms and other realtime services
Why RTAI ?• Hard Real Time operating system may be small and convenient but they do not provide basic features like memory management, networking etc.• This problem was solved by Rtlinux which has been used as a basis for many other real-time Linux solutions.• One of the solutions based on RTLinux is Real- Time Application Interface (RTAI).
Architecture of RTAI• RTAI treats the conventional Linux kernel as a low-priority real-time task.• There are interrupts originating from processor and peripherals• processor originated interrupts are still handled by the standard Linux kernel but the interrupts from the peripherals are handled by RTAI’s Interrupt dispatcher.
Architecture of RTAI(contd..) • The RTAI forwards the interrupts to the standard Linux kernel handlers when there no active real-time tasks • The interrupt disabling and enabling instructions (cli()/sti()) in Linux kernel are replaced by macros that forward the instructions to RTAI.
Hardware abstraction layer• RTAI developers introduced the concept of Real-Time Hardware Abstraction Layer (RTHAL).• RTHAL is a structure installed in the Linux kernel which gathers the pointers to relevant data.• The purpose of RTHAL is to minimize the number of changes needed to make to the kernel code.
Scheduling• The scheduling units of RTAI are called tasks.• There is always at least one task, namely the Linux kernel which is run as a low-priority task.• When real time tasks are added, the scheduler gives them priority over the Linux kernel.• The scheduler provides services which are used in various real-time operating systems.
Interrupt Handling using RTAI Interrupt Occurrence RTAI Dispatcher RT Int Handler Linux Dispatcher SRQ Dispatcher Linux Intr Ret Interupt Return Return to Program Execution
Services provided by RTAI• RTAI provides a variety of mechanisms for inter- process communication• RTAI include a memory management modules which allows dynamic allocation of memory in the real-time tasks• RTAI provides pthreads module which implements threads according to the POSIX 1003.1c standard.• RTAI provides API(LXRT) for Real Time Application Development
Conclusion• Like Linux itself the RTAI software is a community effort.• Substantial research is going on to make this software work in all platforms• Open Source development methodology frees this software from any patent restrictions