Font Size: a A A

Improvement Of A Scheduling Algorithm For Embedded System μCOS-Ⅱ Kernel

Posted on:2013-01-24Degree:MasterType:Thesis
Country:ChinaCandidate:D M ChenFull Text:PDF
GTID:2248330371983460Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Embedded system is an important branch of the computer system. With thewidely use of the computer, the applications of the embedded system is becomingmore and more popular. As focusing on the application, the embedded systemimproves the level of our lives and makes it more convenience. We can find thedevices are designed based on the embedded system everywhere in our living space.Such as PDA, mobile phone, motorcar. And even in the devices used in the missilelauncher.The embedded operating system is the core of the embedded system. The qualityof the embedded operating system which is designed determines the stability andreliability of the entire embedded system. Researchers never loss their interest andstop their steps doing researches and developments since the emerge nce of theembedded system.μC/OS-II is an embedded operating system. It reflects the ingenious idea of theauthor. And its structure is simple and concise. The codes of the μC/OS-II are easy tounderstand. μC/OS-II successfully achieves the functions which are indispensable ofthe real-time operating system. It is designed in the micro-kernel method. All thereasons above make the μC/OS-II widely used in the field of the embedded system.In this thesis, firstly, it does some research and entirely knows the schedulingalgorithm of the μC/OS-II. And then, it gives some deficiencies of the μC/OS-IIoperating system. Such as, a priority only supports one task. The tasks supported bythe μC/OS-II are few. And the task which has low priority waits for a long time.Based on the above deficiencies and combined the advantages of the μC/OS-II, thisthesis give a new scheduling algorithm. The new scheduling algorithm makes the priority scheduling algorithm as the first layer scheduling. Some data structures whichare needed are redefined, such as the task controller. And it gives the descriptionsabout the structure organization chart, the initialization of the task controller, theestablishment of the linked list, the scheduling process and the deletion of the tasks.And it gives the explicit explanation. Finally, the function is improved. And it givesthe process of the scheduling. Based on the different requirement of the tasks, all thetasks are divided in two categories. It is called the real-time task and the time-sharingtask.The top16priorities are used by the real-time tasks. And there is only onereal-time task corresponding one priority. The real-time task is executed by theμC/OS-II system in the first time. The reason of design is to meet the real-time tasksrequiring real-time scheduling in some special situation.The priority which are used by the time-sharing tasks are between the real-timetasks and the statistical task, the idle task. The time-sharing tasks are those that are noneed to execute by the CPU firstly. And there are one or more time-sharing taskscorresponding one priority. All the time-sharing tasks are stored in the form of doublylinked list. It makes the priority scheduling algorithm as the first layer scheduling.And it makes the time slice scheduling as the second layer scheduling. When thepriority which is corresponding one or more time-sharing tasks is scheduled by theCPU, the time slice scheduling will be ran on the doubly linked list which is linked tothe table OSTCBPrioTbl[]. After a time-sharing task is executed by CPU in theprocess of the scheduling, it will see that whether there is a real-time task which is ina higher priority ready. If the task exists, the system will go to schedule it. If the tasknot exists, the system still remains to schedule the next time-sharing task which islinked to the doubly linked list. But the time-sharing tasks which have top prioritycannot have the privilege to interrupt in the process of time-sharing scheduling.After the improvement of the scheduling algorithm, we can make the priority ofthe tasks more reasonable. It can meet the requirement of the real-time response. Andit also can realize that one priority can support one or more tasks. And finally, thenumber of the task supported by the μC/OS-II gets increase. At last, this thesis gives the test report of the new scheduling algorithm for theμC/OS-II kernel. And it can meet all the requirements.
Keywords/Search Tags:Real-time, Priority, Time slice, Multi task
PDF Full Text Request
Related items