0
$\begingroup$

I am currently trying to optimise the scheduler of FreeRTOS and in general Real-Time Operating Systems as a Project.

In FreeRTOS, and I suspect other RTOS as well, we don't specify the deadline for the tasks, not to mention the tasks would mostly be periodic.

How can we, if possible, generate the deadline for them?

Maybe a constant added to the time task reached the ready queue? Where the constant depends on the priority.

How should I go about it? Looking for suggestions...

In short, how can we implement something like Earliest Deadline First?

I am actually trying to implement Ant Colony Optimisation.

Edit: In FreeRTOS the API of OS doesn't need deadline to create Task, only Priority can be set.

$\endgroup$

1 Answer 1

1
$\begingroup$

You can't generate a deadline from nothing. That doesn't make sense.

Some tasks must be completed by a certain time, or they are useless. Only the programmer who writes the task knows whether this is the case, and if so, knows when they have to be completed by. That's not something that the OS can infer, because it depends on what the task is doing and why.

For instance, a task that adjust the jet engine's power level in response to pilot commands might need to respond rapidly to make sure that safety requirements are met. However, a task that displays frames of a movie on the passenger's entertainment system is probably less critical; if the next frame of video doesn't get displayed or is delayed, there's no great harm done. The OS cannot distinguish those two cases. Only the software developer can.

Therefore, in a real-time OS that tries to meet task deadlines, the deadlines come from the software developer.

For periodic tasks, we might not have a fixed deadline, but we might have requirements on how often they run (e.g., must occur at least two times per second).

$\endgroup$
1
  • $\begingroup$ So basically, how to find if a task has been successfully scheduled. Since the programmer is not providing the deadline, only priority of the task. My thought was to convert priority to a deadline. $\endgroup$ Commented Jan 6, 2018 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.