Abstract

In embedded operating systems, how to ensure thread tasks execute in order of priority is an important issue. Considering that thread may have child threads, and child threads are scheduled by their parent thread, so they also need to be executed accroding to their priorities. For such two-level scheduling issue, this paper proposes a new scheduling policy: parent thread uses the table-driven scheduling policy, and child thread uses the fixed priority scheduling policy to ensure the orderly execution of both parent and child threads. In order to cooperate with the implementation of two-level scheduling, this paper also realizes the creation of child threads in an embedded operating system by imitating Linux thread replication, connects the parent and child threads through pointers, and realizes a priority queue of child threads in their parent thread. In addition, by saving the ID of current executing child thread into the stack of corresponding parent thread, this paper ensures that parent thread can recover its last executing child thread after several switches of parent threads. Several experiments on 2440 single core development board showed that method proposed by this paper could realize the creation of sub threads and two-level thread scheduling in embedded operating system.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.