Hi all, I am trying to implement Earliest deadline scheduling algorithm using MCBSTR9 board using RTX kernel. Can anybody tell me how to calculate the deadline of the current executing task when another task comes into active state for assigning the priorities of the tasks according to the deadline?
Thanks and regards S.Pradeep
I would use absolute times for deadlines. All tasks are assigned an absolute deadline when they enter the system. If a task takes 40ms to complete its "deadline" is the current time plus 40ms (current time as of entering the systme). This tasks deadline is ALWAYS that original "current time" plus 40ms, not matter how long it has run.
Sorry for using the term "complete" instead of deadline.
All tasks should calculate their absolute deadline time when they enter the system. The task with the lowest deadline time is the task that should be running. A tasks absolute deadline will never change, not matter how long it has been running.