Real-time system is a hot spot in computer application. Linux, as its open source, highstability, low cost and some other characteristics, is so fit for embedded system developments and has become the fastest developing operating system in this field. Improving general Linux's real-time capability to make it more fit for embedded system applications is in great practical significance and has become one of hot research directions in domestic and foreign computer fields.Linux is originally designed as an time share operating system. Due to it's non-preemptive kernel, coarse time granularity, frequently interrupt disable, virtual memory and other buffer mechanism, Linux is not so"real-time"as an RTOS.On the basis of reading and research of Linux 2.6 kernel resource codes and lots of documents and materials, the paper gives the deep analyses and summaries of Linux 2.6 kernel's task scheduler mechanism. As the improvement solution, as to the problem of Linux 2.6 kernel lacking in real-time scheduling algorithms and policies in the scheduler mechanism, the "laxity" notion is introduced from the good dynamic real-time scheduling algorithm LSF(laxity small first). Combination of the laxity and 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. In addition the Value & Minimum- Laxity- First Scheduling (VMLF) algorithm was proposed instead of the original kernel FIFO algorithm,which is more the fit for high real-time application in embedded fields. |