Version 10 (modified by JoelSherrill, on Mar 5, 2013 at 10:19:37 PM) (diff)


SuperCore? Scheduler


Joel Sherrill


Introduction: As part of GSoC 2010, Gedare Bloom refactored the old RTEMS scheduler to create a new modular SuperCore? scheduler, see rtems-sched. The goal of that project was to be able to support multiple scheduler implementations in an integrated and configurable infrastructure. Prior to Gedare's project, the scheduler was dispersed throughout the thread handling logic of the SuperCore?. Capturing that scheduler in a framework allowed for new scheduling mechanisms to be implemented more easily in RTEMS. His work resulted in the Deterministic Priority Scheduler and Earliest Deadline First (EDF) schedulers. Gedare mentored a GSOC 2011 project to add the Constant Bandwidth Server Scheduler to RTEMS. In parallel with this work, the initial SMP support was developed and the Simple SMP Priority Scheduler was added by JoelSherrill. Along the way, the Simple Priority Scheduler was implemented which provides an alternative for TinyRTEMS environments.

In particular, the following are potential areas which are open for student creative solutions. However, any work in these areas needs to be discussed and approved.

  • alternative uniprocessor schedulers.
  • alternative SMP-aware schedulers.

Current ideas for improvements:

  • Refactoring of Thread Set Managers and use them in scheduling algorithms. See

Goal: The basic goals are met. Tasks listed are improvements.

Requirements: The person(s) implementing this should at least be familiar with the design of the new scheduler framework. Additionally, experience in refactoring is a plus.

Resources: Contact Joel Sherrill or Gedare Bloom. A high-level overview of the modular scheduler.

Small related tasks

  • Convert writing a scheduler to texinfo and add to RTEMS Documentation.

Large related tasks

Thread Ready Set and Block 2-n Refactoring

RTEMS manages sets of tasks/threads. Some are sets waiting on resources which are managed by the SuperCore? Thread Queue handler. There is a single set of tasks ready to execute which is managed by the Scheduler. There is a set of tasks executing (1-n depending on number of cores) which are selected for execution by the Scheduler.

This task has a series of steps which make this more design more obvious at the SuperCore? level. In general, the "package names" suck at this point but hopefully this explanation and project will make this organization more obvious and flexible. All names proposed in the following are up for discussion.

The currently identified steps in this project are:

  • Create SuperCore? Handlers for Task Sets:
    • Refactor "FIFO for Priority Ordering" from Scheduler Simple into something like "ThreadSetSimplePriority?"
    • Refactor priority discipline from Thread Queue (e.g. Block 2-n structure) and name it something like "ThreadSetBlock2nPriority"
    • Refactor Thread Set from Deterministic Priority Scheduler and name it something like "ThreadSetDeterministicPriority?"
  • Add Scheduler which uses Block2-n
  • Rework Scheduler Simple SMP to use Block 2-n (if feasible)
  • Run Timing Tests with each scheduler as default
    • A report on the performance of each scheduler including graphs.
  • Helping provide more guidance in selecting the appropriate scheduler for an application is needed. The guidance would include the goals of the scheduler along with the time and space characteristics of operations like blocking and readying.
    • Deterministic Priority Scheduler is O(constant)
    • Simple Priority Scheduler has some operations that are O(number of tasks)
    • Simple Scheduler SMP has some O(number of tasks) and others which are O(number of cores)
    • Block2N based scheduler would be bounded but worst case basically O(constant). It can iterate a few times but that has a maximum that is designed in.

Related Tasks

Miscellaneous Sections

As the project progresses, you will need to add build instructions, etc and this page will evolve from a project description into a HOWTO.


  • TBD

Other sections: If you have more to say about the project that doesn't fit in the proposed sections of this template, feel free to add other sections at will.