Skip to content

Simulation of the behaviour of a Preemptive Fixed Priority Rate Monotonic Scheduler in C++

Notifications You must be signed in to change notification settings

sampreets3/scheduler-RM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: GPL v3 Maintenance Open Source Love svg3

scheduler-RM

Simulation of the behavior of a Preemptive Fixed Priority Rate Monotonic Scheduler in C++.


Overview

This project focusses on building a preemptive fixed priority rate monotonic task scheduler in C++. Done as a part of the Real-Time Scheduling course at École Centrale de Nantes. The aim of this project is to create a simulation of a standard Rate Monotonic scheduler in order to gain a better understanding at building Hard Real-Time systems. The choice of scheduling algorithm was kept to be Rate Monotonic, since it is the easiest deterministic scheduler to implement. I have tried to design the software to be optimal to the best of my abilities, but if you can provide a more elegant solution, feel free to contribute to this project.

A simple outlook of the algorithm can be as follows:

Each task has its own Task Control Block, containing necessary information about the task. The algorithm will assign priorities offline, and simulate for one hyperperiod. At each time interval of the simulation, the task with the highest priority will be executed, until there are no more tasks to be executed.

Also, before generating the schedule, it is imperative that we run schedulability tests on the task set to determine whether it is feasible or not. The software runs these schedulability tests on the task set and computes the schedule if and only if the task set is feasible.


Usage

  1. First, you have to clone the repo onto your local machine : git clone https://github.com/sampreets3/scheduler-RM.git
  2. Then, navigate into the project directory by using : cd scheduler-RM
  3. You have to create a build folder inside of the project directory : mkdir build && cd build
  4. You can then generate the Makefile using CMake : cmake ..
  5. You will have to run the Makefile to generate the executable: make
  6. Finally, you can run the executable using: ./task

In case you need to delete all executables and start afresh, you can do so with the command : make clean


Contribute

Feel free to request features, and make changes to the project! If you have an idea in mind, you can open an issue and create a pull request to make your changes. The general practice that I follow is each feature gets its own branch. It would be great if you could adhere to that.


Contact

If you have any questions, feel free to contact me at [email protected]


About

Simulation of the behaviour of a Preemptive Fixed Priority Rate Monotonic Scheduler in C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published