Font Size: a A A

Research And Implementation Of Embedded Real-time Linux Based On RTAI

Posted on:2011-02-11Degree:MasterType:Thesis
Country:ChinaCandidate:J S ZhengFull Text:PDF
GTID:2178360305454634Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Embedded systems accessed to a wide range of applications in aerospace, military, industrial control, automotive electronics. Linux in embedded development unparalleled advantages over other operating systems by its advantages of open-source, high- performance. MontaVista Linux operating system has been widely adopte at communications equipments.Compared with Linux2.4 kernel,Linux2.6 Introduced O(1) scheduling algorithm, achieved kernel preemption mechanism, improved synchronization, interrupt response time performance and scheduling.It has a greatly improved in scheduling performance, real-time and other aspects.Although the Linux2.6 kernel has been greatly improved,it still unable to Meet the requirements of the hard real-time applications.Linux kernel must be modified so that it can be used to hard real-time applications.There are three ways to Modify Linux kernel .The first way is Make changes directly to the Linux kernel for real time applications, its main idea is that by modifying the standard Linux kernel, reduced Linux scheduling latency, improve the Linux real-time performance.The second way is add a resource kernel , Provides preemptive, certified ways access to system resources for real-time applications through the resources kernel.the last one is dual kernel. Dual kernel program is based on a loosely coupled real-time kernel to the standard Linux kernel for external expansion, take over the hardware interrupt in order to real-time task can be scheduling and running priority by the real-time kerne.We decided to modify the stand Linux2.6.28 kernel for real-time applications by used dual kernel program after analysis.There are three project uses dual kernel program.they are RT-Linux,RTAI and Xenomai. RT-Linux is very mature, However, with the FSMlab has been acquired by Windriver, RT-Linux was restricted to copyright. RTAI and Xenomai are based on Adeos , RTAI focus on the lowest possible delay and Xenomai focus on compatibility.RTAI3.8 constitutes a dual-core real-time with the Linux operating system based on the domain and interrupt pipeline mechanism by the service form Adeos. RTAI and Linux in turn to receive interrupt according to their own priorities through the interrupt pipeline.Linux kernel was threated as the lowest priority process by RTAI kernel and shared processor with RTAI kernel in RTAI/Linux dual kernel real-time operationing system. The RTAI kernel has a complete preemped scheduler based on the static priority consistented with the standard of posix1003.1b . Linux tasks suspended until all real-time task are idle.ARM processors were widely used in the embedded field, the target platform for the RTAI/Linux dual kernel real-time operationing system is UP2410-DEV which based on S3C2410 processor by the reason of ARM architecture is high performance and low power consumption .RTAI support for specific processor platform mainly through the way of modify the description file of corresponding processor-based platforms in stand Linux kernel by patch files.in RTAI path \base\arch. In order to RTAI3.8 run on S3C2410 processor-based platforms for the reason of RTAI3.8 does not support the S3C2410 processor platforms,we modify the description file of S3C2410 processor platforms in Linux2.6.28 directory according to the hardware features of S3c2410 processor platform.we used vivi as the bootloader, modified the UP2410-DEV nand-flash partition and vivi's partition information so that the partition is suitable for the RTAI/Linux dual kernel real-time operationing system. Achieved root file system and basic shell commands for the RTAI/Linux dual kernel real-time operationing system by the busybox1.5.3 and yaffs2 file system.After compile,we write RTAI/Linux dual-core real-time systems kernel image and root file system image into UP2410-DEV's nand flash,the RTAI/Linux dual kernel real time operating system running stable on UP2410-DEV.Finally we tested the interrupt response latency time of the RTAI/Linux dual kernel real-time operationing system in Linux's user space and RTAI kernel space with the test programs latency and klatency. Latency test program mainly reflected the interrupt response latency time of the soft real-time application that runs on the Linux user space. Latency test result is about 19ms on average and 8ms best, the worst response time is 93ms.That seemed the RTAI/Linux dual kernel real-time operationing system meeted the requirements of soft real-time applications. Klatency test program mainly reflected the interrupt response latency time of the hard real-time application that runs on the RTAI kernel space. Klatency test result is about 3ms on average and the worst response time is 30.177ms.Because the test result is displayed by the screen print program,it running on Linux user space and receive klatency test data from RTAI kernel space through FIFO,thus, in practical applications, the system's hard real-time interrupt response time of the application is lower than tests result by klatency program, the RTAI/Linux dual kernel real-time operationing system meeted the general requirements of hard real-time applications. This paper carried out a method to modify standard Linux2.6.28 kernel for real-time applications based on RTAI,Realized platform support for S3c2410 according the way of modify the description file of S3C2410 processor platforms in Linux2.6.28 directory.Test results showed that the task response delay of the RTAI/Linux dual kernel real time operation system running on UP2410-DEV reached a microsecond-level and the system running stable.
Keywords/Search Tags:Embedded Systems, Linux, RTAI, Real-time
PDF Full Text Request
Related items