| With the advantages of open source, high stability, low cost and configurability, Linux is more and more widely used in embedded system applications and has become the fastest developing operating system in this field. However, its design principles are throuthput maximization and scheduling fairness but not real-time capability which is required by many embedded applications. Besides, those kernel debugging tools abailable on PCs can not be applied to embedded Linux, which makes the kernel development more difficult. Improving general Linux's performance to make it more suitable for embedded system applications is in great practical significance and has become one of hot research directions in computer science and technology.On the basis of reading and researching of Linux 2.6 kernel source codes and lots of documents and materials, the paper gives a deep analyze and summary of Linux 2.6 kernel's several sub-systems. Two improvement solutions are provided. The first, in order to improve the real-time performance of general Linux, one-shot mode is introduced into the timing system of Linux 2.6 kernel from the principle of timer mechanism improvement in Kurt-Linux. The new timer mechanism makes the system reached the microsecond level timer precision and maintains its original load capability. As to the problem of Linux 2.6 kernel's lack of real-time scheduling algorithms and policies in the scheduler mechanism, a dynamic real-time scheduling algorithm is add to the Linux 2.6 scheduler. The the new task scheduler data structure in Linux2.6 enhances the system's real-time scheduler capability as well as maintains the original O (1) scheduling characteristic. The second, improvement is made to the source code level kernel debugger KGDB, which is only available on PCs, to make it working for embedded system, which greatly eases the procedure to debug embedded Linux kernel and device drivers.In the part of real-time capability testing, general Linux 2.6 kernel and the improved system are compared on timer interrupt processing time and scheduler timing accuracy. From the testing results, we can see that the improved Linux system has the stronger real-time capability than general Linux 2.6 kernel and is better for the real-time application in embedded fields. |