LED Flashes

@skyr check out this lesson on Preemptive, priority-based scheduling … this should help further cement your reading

This is not what I meant by

It looks like you are talking about frequency of operation, whereas I was alluding to execution time.

c.f. _Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment, Journal of the ACM: Liu, C.L, Layland, J. W. (January 1973)_
Rate Monotonic Analysis for Real-Time Systems, Technical Report CMU/SEI-91-TR-6 ESD-91-TR-6: Liu S., Klein M. H., Goodenough J. B. (1991)

Again, there is no actual requirement that higher priority tasks run for shorter times than lower priority tasks. It may be common that they do, but it is not needed.

If you have an operation that has a 6 ms deadline, and take 5 ms to compute, then that is likely one of your top priority tasks, even if other tasks can be quicker but have a longer deadline.

Yes, there is often a strong correlation between deadline and priority, but even that is not totally required, and some conditions might require changing that formula.

1 Like