<div dir="ltr">The cputime() function is in liblitmus/bin/clocks.c, and calls clock_gettime with CLOCK_THREAD_CPUTIME_ID. This returns the amount of CPU time consumed by that thread only, not the current system time.<br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 17, 2013 at 5:00 AM, Björn Brandenburg <span dir="ltr"><<a href="mailto:bbb@mpi-sws.org" target="_blank">bbb@mpi-sws.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 17.04.2013, at 04:57, Sisu Xi <<a href="mailto:xisisu@gmail.com">xisisu@gmail.com</a>> wrote:<br>
<br>
> I am trying to understand the rtspin program and have some question about it.<br>
><br>
> 1) Seems it will read execution time from a file. Is this the execution time for each individual job?<br>
<br>
</div>Yes<br>
<div class="im"><br>
> Is there any sample file for this? How should I format the file?<br>
<br>
</div>I don't have a sample file, but the format should be fairly simple. Chris Kenna implemented this; he might be able to tell you more about this.<br>
<br>
Anyway, the file support is entirely optional, you don't have to use it (I usually don't).<br>
<div class="im"><br>
><br>
> 2) The budget enforcement, if configured as precise_enforcement, will force job to yield when it exceed wcet.<br>
> However, if I configure it as no_enforcement, the wcet parameter won't be used. cause the scheduling decision are made based on period/deadline, is this correct?<br>
<br>
</div>That depends on which scheduling plugin you are using. The scheduling policy has nothing to do with rtspin.<br>
<div class="im"><br>
> 3) Is it possible to run multiple rtspin task at the same time? I see it records time using:<br>
><br>
> while (now + last_loop < start + exec_time) {<br>
> loop_start = now;<br>
> tmp += loop_once();<br>
> now = cputime();<br>
> last_loop = now - loop_start;<br>
><br>
> If multiple tasks are running, would't the time be incorrect?<br>
<br>
</div>No. Why would it?<br>
<br>
- Björn<br>
<br>
<br>
_______________________________________________<br>
litmus-dev mailing list<br>
<a href="mailto:litmus-dev@lists.litmus-rt.org">litmus-dev@lists.litmus-rt.org</a><br>
<a href="https://lists.litmus-rt.org/listinfo/litmus-dev" target="_blank">https://lists.litmus-rt.org/listinfo/litmus-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Jonathan Herman<br>Department of Computer Science at UNC Chapel Hill
</div>