摘要
μC/OS_Ⅱ内核最多可以管理64个任务,当工程的复杂度增加时,必须改换其他的开发平台,导致了前期工作变为徒劳。通过简易可行的方法来增加任务管理数目很有必要。μC/OS_Ⅱ内核原来的优先级调度算法的优先级变量总共8位,只用了其中的低6位,高2位未被使用。在尽量不改变内核的数据结构的情况下,为了增加内核可以管理任务的数目,把第7位使用起来,这样存放优先级就绪表的行信息将会增加1位,可以使任务数增加到128个。任务的就绪状态由一个二维数组存储,这样可以增加内核管理的任务数目,而较小程度地改变内核本身原来的数据结构,通过改进使它在嵌入式开发中的应用更广泛。
The μC/OS_ II kernel can manage up to 64 tasks. When the complexity of the project increases,if the number of tasks is more than 64 ,you must switch to other development platforms, which may cause a lot of pre-development work void. To solve this problem, according to μC/OS H itself the task of scalability, a feasible method to increase the number of management tasks is proposed based on the original priority scheduling algorithm. Through the analysis of the μC/OS_II kernel,find that the variables priority of original priority scheduling algorithm is a total of eight bits. And only the lower 6 bits of those 8 bits are used. The improved algorithm expands the number of tasks from 64 to 128. This improvement will make it more widely used in the actual embedded development.
出处
《计算机技术与发展》
2011年第11期11-14,共4页
Computer Technology and Development
基金
四川省杰出青年科技基金(2010JQ0011)