[LITMUS^RT] Schedulability checking

Felipe Cerqueira felipeqcerqueira at gmail.com
Fri Feb 17 17:50:56 CET 2012


Dear Litmus developers,

Litmus-RT papers usually include schedulability comparisons that use
schedulability tests and tasks inflated with overhead costs.
Is it possible to check schedulability by actually running the tasks?

I've been trying to modify rtspin to do that, but I'm facing some problems.


In rtspin, there's this job() function, which is called with 90% of the
WCET, instead of 100%.

static int job(double exec_time)
{
	loop_for(exec_time);
	sleep_next_period();
	return 0;
}

With 90%, a task seldom misses a deadline, so the program runs as it is
supposed to.
But to check schedulability, I had to make the tasks run with 100%
utilization.

When we change to 100%, though, a problem starts to happen. The first job
runs for longer than the WCET (inside loop_for()), so it leaves some code
to be executed in the second job.
But then we get to sleep_next_period(). The task is blocked until next
period, so every second job of the task doesn't run. Please have a look at
the screenshot.


That happens because the application and the scheduler are independent. But
that's a normal behaviour, because applications aren't supposed to run for
longer than the WCET.
The scheduler doesn't know if the application is tardy.

I was thinking about removing sleep_next_period() and putting the program
to access memory continuously. I could export the out_of_time flag to the
application and keep checking it.
But that way I would consider only the overheads visible to the scheduler,
ignoring cache-related overheads for example, because for the scheduler the
task would always run for "x" time units.

Has anyone already done schedulability checking inside the application? I
thought it would be easier to do than embedding overhead costs within the
tasks.
In case it is a bad approach, I can try the usual way.

Thanks,
Felipe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20120217/1bfad69b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen5.png
Type: image/png
Size: 268640 bytes
Desc: not available
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20120217/1bfad69b/attachment.png>


More information about the litmus-dev mailing list