[LITMUS^RT] Deadline and release miss in EDF

Kuan Hsun Chen kuan-hsun.chen at tu-dortmund.de
Sat Jan 21 07:42:12 CET 2017


Hi Tianyang,

I am interested to the overrun handling problem as well.
No matter which scheduler you use in LitmusRT, when a job is finished and
calling job_completion(), prepare_for_next_period() will be called.
By digging into this function, you can see that setup_release() will update
job sequence number, i.e., job_no.
This number will be checked in sys_wait_for_job_release() in litmus.c.

As we can read in the comment, "If the last job overran, then job <= job_no
and we don't send the task to sleep".
The idea here is to check if the current job is the exact the last ready
job of this task.
The task is only going to sleep only when its # of released job is larger
than job_no by triggering complete_job().
Therefore, those postponed jobs will be released still until the condition
holds, and your first problem is somehow not existed. Am I right?

About your second question, I find that job_completion() is defined
differently in pfp and edf, i.e., sched_trace_task_release(t) is not called
in edf.
I'm not sure if it is related :P

Best,
Kuan-Hsun


2017-01-21 0:20 GMT+01:00 Chen, Tianyang <tiche at seas.upenn.edu>:

> Hi Björn,
>
> I have some questions about the EDF scheduler.
>
> I have been looking at the source code of psn_edf scheduler and it looks
> like when a task misses its deadline(assuming the same as its period), the
> next release will be checked as soon as requeue() is called. Because the
> next release should be in the past, the task is put on ready_queue
> immediately, which might be picked again in the main schedule() function
> afterwards.
>
> Let me know if my understanding is correct: Each task will only have one
> job active (because rt_param has only one heap_node). The next release is
> kinda triggered after the scheduler requeues the task(if it goes to
> release_queue, it arms the timer to fire on the next release). If the task
> is on the ready_queue and never picked, there will NOT be a second release.
>
> Also, there is no release arrow showing on the feather trace pdf if a task
> is added back to ready_queue right after a deadline miss. Is it missing a
> trace statement?
>
> So I'm thinking about adding some sort of job buffer to each rt_task and
> essentially queue jobs, say during some overloaded conditions, and run them
> later. But when I looked at the code, there needs some major changes to the
> code and I can't really avoid breaking other scheduler plugins. I was just
> thinking about adding a list of heap_node and rt_job param and maybe
> refactoring anywhere that checks job params, which might be a change. Let
> me know what you think!
>
> Thanks,
> Tianyang
>
> _______________________________________________
> litmus-dev mailing list
> litmus-dev at lists.litmus-rt.org
> https://lists.litmus-rt.org/listinfo/litmus-dev
>



-- 
M.Sc. Kuan-Hsun Chen

TU Dortmund
Department of Computer Science 12
Design Automation of Embedded Systems
Otto-Hahn-Strasse 16, Room 102

44227 Dortmund
Germany

Phone:  *+49 231 755 6124 <+49%20231%207556124>*
Mail:   kuan-hsun.chen at tu-dortmund.de <kuan-hsun.chen at tu-dortmund.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20170121/239ebd54/attachment.html>


More information about the litmus-dev mailing list