μC/OS-Ⅱ is an open source real-time kernel adopting priority preemptive schedule strategy. Aiming at the problem of μC/OS-Ⅱ failing to support homology priority tasks scheduling,an approach for solution is proposed. The basic idea is adding round-robin scheduling strategy in its original scheduler in order to schedule homology priority tasks through time slice round-robin. Implementation approach is given in detail. Firstly,the Task Control Block(TCB) is extended. And then,a new priority index table is created,in which each index pointer points to a set of ho-mology priority tasks. Eventually,on the basis of reconstructing μC/OS-Ⅱ real-time kernel,task scheduling module is rewritten. Otherwise,schedulability of homology task supported by modified kernel had been analyzed,and deadline formula of created ho-mology tasks is given. By theoretical analysis and experiment verification,the modified kernel can support homology priority tasks scheduling,meanwhile,it also remains preemptive property of original μC/OS-Ⅱ.
展开▼