With the rapid development of computer technology, especially the extensive use of embedded systems, the traditional fault recording device has many shortages in real-time, reliability and stability. Other commercial embedded operating system, such as vxworks, is very expensive. Embedded Linux is powerful, stable and reliable, but its nature is time-sharing operating system, there is a big disadvantage on real-time. In this paper, RTLinux+Linux dual-core operating system is preposed to apply in fault recordor.This paper analyzes the several constraint factors, of real-time Linux and puts forward a real-time clock based APIC transformation method with transform ordinary APIC clock, to meet the demand for high-precision real-time. Multiple simulation experiments prove the effectiveness of the modified method, its real-time precision can reach 100us levels.This article analyzes the basic principle of RTLinux and implementation mechanisms, and as a basis for creating RTLinux+Linux dual-core real-time system. In general, RTLinux +Linux kernel patch, ordinary kernel+RTLinux+preempted kernel patch of platform, based on six operation processes, such as the recompile the kernel, TCP data communication, inter-process communication, through the sharing memory, documents of floating point calculations and reading, read the random data buffer, and simulated the fault record basic applications.The results show that 99.999%of the response time less than 5ms about the ordinary+RTLinux kernel, but there exist several jitters between 5ms to 10ms. The maximum response time about ordinary kernel+RTLinux+preempted kernel is 1.2ms, and 99.99992%of the interrupt response time less than 100us.It is the best above all, and can to meet the functional requirements of the various fault recorder.According to the functional requirements of fault recorder, it create the RTLinux+ Linux dual-core real-time system based on ARM, including network card drivers, USB and SD storage device drivers. Then simulate the basic function of fault record, design the communication programs and files remote transmission module based on Ethernet. Through the simulation experiment platform of real-time performance of dual-core testing, the results show that the RTLinux+Linux dual-core platform real-time response performance has been greatly improved than common Linux. On this dual-core platform, the sampling rate of ault recorder can be up to 30.72 KHz, and 409 roads of analog or 819 roads of switch signal. |