<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div><br>On Dec 3, 2013, at 4:50 PM, "Luo, Zheng" <<a href="mailto:luozheng@wustl.edu">luozheng@wustl.edu</a>> wrote:<br><br></div><blockquote type="cite"><div>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif; font-size: 12pt; color: #000000; margin: 0">
<p>Hi all,</p>
<p><br>
</p>
<p>I have a question about he EDF in the base_mt_task.c</p>
<p><br>
</p>
<p>void* rt_thread(void *tcontext)</p>
<p>{</p>
<p><span class="Apple-tab-span" style="white-space:pre"></span>int do_exit;</p>
<p><span class="Apple-tab-span" style="white-space:pre"></span>struct thread_context *ctx = (struct thread_context *) tcontext;</p>
<p><span class="Apple-tab-span" style="white-space:pre"></span>struct rt_task param;</p>
<p><br>
</p>
<p><span class="Apple-tab-span" style="white-space:pre"></span>/* Set up task parameters */</p>
<p><span class="Apple-tab-span" style="white-space:pre"></span>init_rt_task_param(¶m);</p>
<p><span class="Apple-tab-span" style="white-space:pre"></span>param.exec_cost = ms2ns(EXEC_COST);</p>
<p><span class="Apple-tab-span" style="white-space:pre"></span>param.period = ms2ns(PERIOD);</p>
<p><span class="Apple-tab-span" style="white-space:pre"></span>param.relative_deadline = ms2ns(RELATIVE_DEADLINE);</p>
<p> ......</p>
<p> ......</p>
<p><br>
</p>
<p>}</p>
<p><br>
</p>
<p>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. </p>
<div>
<p><br>
</p>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>Zheng Luo</div></div></div></div></div></blockquote><br><div>Hi Zheng,</div><div><br></div><div>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 (<a href="https://github.com/LITMUS-RT/rt-kernelshark">https://github.com/LITMUS-RT/rt-kernelshark</a>) and post a screenshot. That may give us enough information to help.</div><div><br></div><div>-Glenn</div></body></html>