Strong APA Scheduler

Project Objective

To add the Strong APA scheduler in RTEMS. Strong APA scheduler would allow higher-priority tasks to be ”dislodged” or moved among processors in order to make space for lower priority tasks that are limited by affinity constraints [1]

 Consequently, this would allow RTEMS to achieve improved schedulability (i.e., lower response-time bounds).

Please refer to the documentation to learn more about the scheduler: https://richidubey.github.io/Strong-APA-Documentation/html/

Links to important code

Link to merged PRs: RTEMS Git Link 1, RTEMS Git Link 2

Link to explanation about low level and high level design of the scheduler in RTEMS: High Level Design, Low Level Design

  1. Changes in priority scheduler (Github link)
  2. Changes in simple scheduler (Github link)
  3. Code for testcase for Strong APA scheduler (Github link)
  4. Code for another testcase for Strong APA scheduler (Github link)
  5. Code for all the changes required for Strong APA scheduler (Github link)

Short Summary of Work

Phase I (June 2020):

I spent this month understanding how the scheduler framework works in RTEMS. I made changes in the existing single processor scheduler that were visible while running testcases corresponding to those changes.

The commits and the changes can be accessed via :

– Github link (changes in Priority Scheduler)

– Github link (changes in Simple Scheduler)

A consolidated report of my achievements (and failures) is present in this blog post.

Phase II (July 2020):

I started making small changes in the existing Strong APA code present in RTEMS and also understanding how the SMP scheduler framework works. I released the first version of my scheduler with its documentation that had lots of pseudo and untested code, but was a good starting point for explaining my plan to others in the community.

– Github link to changes for first version

– Github link to documentation at the first version’s commit. To check the documentation, open the index.html from a browser.

Phase III (August 2020):

I made the most progress in this phase as everything I had been trying for the past 4 months started making sense together and I started spending a lot more time on coding. I finished the Strong APA scheduler implementation, improved the documentation, made 2 testcases based on the paper [1] which the scheduler passed. I tested my scheduler on qemu and arm-gdb. The phase wise and week wise progress for the entire GSoC duration can be accessed from the home page of this blog. The important links to work done in this phase are:

Link to final documentation

Link to blog post describing high level design description of the changes implemented in the scheduler

– Link 1 and 2 to blog post describing low level design description of the changes implemented in the scheduler

Link to the code in repository containing 1st testcase for Strong APA

Link to the code in repository containing 2nd testcase for Strong APA

Link to final set of changes for implementation of Strong APA scheduler

To run the scheduler

Set up RTEMS and debugging on your system by following this blog post to add RTEMS 5 with qemu and arm-gdb for realview pbx a9 bsp.

Checkout this repository at the master branch and run ‘make’ from bsp’s folder to generate .exe and then debug/run the .exe as explained in the blog post.

Mentors

Thanks

A big thanks to my mentors and the RTEMS community for being so helpful for the past 5 months. I’m grateful for your patience in answering my doubts on more than 300+ emails on the mailing list. Thanks for having faith in me, without which I would not have been able to do even a tenth of what I achieved.

References

[1] Cerqueira, Felipe & Gujarati, Arpan & Brandenburg, Bjorn. (2015). Linux’s Processor Affinity API, Refined: Shifting Real-Time Tasks Towards Higher Schedulability. Proceedings – Real-Time Systems Symposium. 2015. 249-259. 10.1109/RTSS.2014.29

Design a site like this with WordPress.com
Get started