This is the BLOG of Yang Lifeng, mainly introduces the content of embedded real-time Linux. I graduated from the Chongqing Institute of Technology (now the Chongqing University of Science and Technology), the major is automated. At present, development work under Linux, interested in embedded, hope Let's have a common hobby to exchange learning. This article is my graduation papers written in my graduation. Hello, my full version of FTP is downloaded here. If you need it, you can download it there: I will not send a article through email. Http://wenku.baidu.com/view/6c7e753e0912a2161479291f.html Previous contact information Unexpected, contact information Updated: Email: 31155 At QQ.com, WeChat: A311155 Abstract Album is accompanied by the constant growth of technology. Information appliances, handheld equipment, wireless equipment, etc., the emergence of personalized equipment, and the rapid development of corresponding hardware and software. Many devices are equipped with 32-bit microprocessors produced by companies such as Intel, MIPS, Motorola. Many developers have also begun to provide embedded operating systems for these devices. Embedded systems and real-time systems will have an increasingly important role. The use of Linux builds an embedded operating system is the most exciting solution that has emerged in recent years. This has many reasons. First, the Linux running on the embedded system provides full-featured desktop computing, and is customized because of its open code. Second, Linux has supported chips used on most embedded systems, including Strongarm, MIPS, and PowerPC. Finally, Linux is free, using Linux does not need to pay any fees. Today, the world's Linux operating system, in the spirit of open freedom, attracts the world's gaze, more and more programmers join its ranks. Therefore, Linux is used as the underlying operating system, and the real-time transformation is carried out, and an operating system with real-time application capabilities is a solution to the currently popular embedded operating system. On the market, small handheld devices such as PDA, before the limitations of hardware conditions, we see that the functions are very simple, no network, GUI and other very practical features. But recently Palm and other handheld computers or on the operating system for embedded systems such as Windows CE, we have seen a complete network, graphical user interface support. As the hardware condition of the hand-held device is improved, the estimated embedded system's demand for embedded operating systems will become more and more urgent. I have long been interested in the Linux operating system, and combined with this major, it has made a certain study on Linux applications to embedded real-time environments. Based on these facts, this paper has been discussed in depth of the architecture and some technological inside of the Linux system facing the embedded real-time environment. The paper first outlines the development of embedded systems and real-time systems. The second chapter introduces the research in the field of real-time Linux. The third chapter introduces the design and implementation of typical real-time systems RTLinux, and Chapter 4 introduces RTLinux programming models and some application examples. The fifth chapter of this article will test the performance of RTLinux. Finally, it is a little thinking and looking. Key words: Linux; RTLINUX; real-time system; embedded system.
Directory Abstract I Abstract II Directory ....................................... ................................................ ... III chart and program directory ........................................ .................................. v Abbreviation ........... ................................................ .................................. VI Chapter 1 Embedded real-time system overview ....... ......................................... 1 1.1 Embedded system overview. ................................................ .............. 1 1.1.1 Historical development of embedded technology ........................ ................ 1 1.1.2 Technical features and application prospects of embedded systems ................. ... 2 1.1.3 Typical embedded system .................................. ............... 3 1.2 Real-time system overview ............................ ..................................... 4 1.2.1 What is a real-time system ... ................................................ .... 4 1.2.2 Characteristics of real-time operating system ..................................... ........... 4 Chapter 2 Related Studies on Real Time System ........................................ .......... 6 2.1 Linux Time - time ................................... ......................... 6 2.2 Linux performance test ................... ......................................... 8 2.2.1 Interrupt delay test .. ................................................ ......... 8 2.2.2 context switch test ................................ ..................... 11 2.3 Current real-time operating system ...................... ................................. 12 Chapter 3 Embedded Real Time Linux System RTLinux Design and Implementation 16 3.1 RTLinux structure................................................. ............ 16 3.2 Interrupt simulation ................................ .......................................... 17 3.3 Real-time tasks .... .
................................................ ....................................................................................................................................................... ............................ 20 3.3.2 Creating threads and threads ........... ................................... 21 3.4 Real-time dispatch ............. ................................................ ............................................................... ................................ 21 3.4.2 Design the user's own scheduler .......... .................................. 22 3.5 Timing ............. ................................................ ................... 22 3.5.1 Time related functions ...................... ..................................... 23 3.6 Inter-process communication .......... ................................................ ........... 23 3.6.1 FIFO equipment ................................. ................................. 23 3.6.2 Shared memory ........... ................................................ ....... 24 3.6.3 MBuff driver .................................. . ................... 25 Chapter 4 RTLINUX application design ....................... .................... 26 4.1 Program structure ........................ ................................................ 26 4.2 Basic API .......................................... .............................. 26 4.2.1 POSIX thread creation function ........... .................................... 26 4.2.2 Time related functions ......... ................................................ 28 4.2.3 Thread scheduling function ......................................... ................ 29 4.3 Programming example .............................. ............................................ 30 4.3.1 Real-time part .............................................. .................... 30 4.3.2 Non-real time ...
................................................ ........ 34 4.3.3 Compilation and running procedures ................................ ....................... 35 Chapter 5 RTLINUX performance test ................... ............................ 37 Chapter 6 I feel and experience ............. ................................................ .. 38 references ............................................. ......................................... 40 Acknowledgments ... ................................................ .......................................... 42 Appendix A ... ................................................ .......................................... 43 Appendix B ..... ................................................ ........................................ 59 Charts and program directory Figure 2.1 Asynchronous interruption and Interrupt response time ........................................ 9 Figure 2.2 Off Interruption Time. ................................................ ............... 10 Figure 3.1 RTLinux details diagram ............................ ... ......................................................................................................................................................................................................................... ..................................... 26 Figure 4.2 Real-time program structure ................................................ 30 Table 2.1 Interrupt Closed Template ........................................ ..... 10 table 2.2 Interrupt Closed Time Probability Density Function Template ................. 11 Table 2.3 Context switch time ......... ............................................. 12 Table 5.1 Real-time interrupt delay time ............................................ ...... 37 Program 2.1 Simple Voice Program ................................... ..................... 6 Program 3.1 "Soft" CLI, STI and IRet .................. .......................................................................................... ........