[LITMUS^RT] Question about EDF in base_mt_task.c

Glenn Elliott gelliott at cs.unc.edu
Wed Dec 4 02:12:00 CET 2013



> On Dec 3, 2013, at 4:50 PM, "Luo, Zheng" <luozheng at wustl.edu> wrote:
> 
> Hi all,
> 
> 
> I have a question about he EDF in the base_mt_task.c
> 
> 
> void* rt_thread(void *tcontext)
> 
> {
> 
> int do_exit;
> 
> struct thread_context *ctx = (struct thread_context *) tcontext;
> 
> struct rt_task param;
> 
> 
> /* Set up task parameters */
> 
> init_rt_task_param(&param);
> 
> param.exec_cost = ms2ns(EXEC_COST);
> 
> param.period = ms2ns(PERIOD);
> 
> param.relative_deadline = ms2ns(RELATIVE_DEADLINE);
> 
>         ......
> 
>         ......
> 
> 
> }
> 
> 
> My computer have four cores and I created 5 thread with different deadlines, when I measure the time that when the thread finished, actually the thread which has the latest deadline are not finished last most of the time. I don't quite understand why it happened like this, does any one have any ideas? Or any suggestions that how I can use it? Thank you very much. 
> 
> 
> Zheng Luo

Hi Zheng,

I'm afraid that you haven't really given enough information for any of us to give an informed answer.  I suggest you try visualizing the schedule using rt-kernelshark (https://github.com/LITMUS-RT/rt-kernelshark) and post a screenshot.  That may give us enough information to help.

-Glenn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20131203/b787549b/attachment.html>


More information about the litmus-dev mailing list