Version 12 (modified by Gedare, on Mar 6, 2013 at 8:04:54 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. This is discussed below.

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

Scheduling arbitrary resources

The scheduler focuses on scheduling threads. Other schedulable entities exist within a system, for example I/O (block, network, etc). One task idea is to make the scheduler even more modular with respect to the schedulable resource. This task requires a feasibility study and design before proceeding.

Thread Ready Set and Block 2-n Refactoring

RTEMS manages sets of threads (aka tasks). Some sets are waiting on resources and are managed by the SuperCore? Thread Queue (threadq) handler. There is a single set of ready to execute and executing threads that are managed by the Thread Scheduler (scheduler).

This task has a series of steps which make this 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 Thread Sets:
    • Refactor "FIFO for Priority Ordering" from Scheduler Simple into something like "Thread_set_Priority_fifo"
    • Refactor priority discipline from Thread Queue (e.g. Block 2-n structure) and name it something like "Thread_set_Priority_block2n"
    • Refactor Thread Set from Deterministic Priority Scheduler and name it something like "Thread_set_Priority_deterministic"
  • Rewrite Scheduler infrastructure to use Thread Sets as a pluggable implementation of threads.
  • Add a new Scheduler that uses block2n
  • Rework Scheduler Simple SMP to use block2n (if feasible)
  • Run Timing Tests with each scheduler
    • Report the performance of each scheduler including graphs.
  • Help provide guidance in selecting the appropriate scheduler for an application. 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 that 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.