Re: RFC for a new Scheduling policy/class in the Linux-kernel

Ted Baker
2009-07-15T21:53:05Z

On Tue, Jul 14, 2009 at 09:28:47PM +0200, Henrik Austad wrote:

> ... In MC you need to do this the hard way, namely compute the
> point in time not when the task misses the deadline, but when it
> will *eventually* fail a deadline. By doing that, you combine
> deadline, wcet and granted time in one variable, and you have a
> *single* variable to compare.

This is true in a theoretical sense, and is the basis of some
"optimal" scheduling algorithms, including the "throwforward
scheduling" algorithm. It makes sense in some environments, where
you actually know the WCET of the task in advance. However, I
don't believe a Linux system can expect all applications to
provide this kind of information.

In a system programmed using process and threads, the decision to
sleep or wake is embedded in the internal logic of the thread, and
implemented by system calls. The existing system calls do not
convey how long the thread needs to execute before it reaches its
next suspension point. Therefore, without a new API you cannot
use WCET. If you create a new API for this, you are limiting this
form of scheduling to threads that choose to use that API, and are
able to provide the needed WCET information. This seems like a
small number of cases among the full range of real-time Linux
applications.

Ted