> 
> With a little example, perhaps it could be easier to understand what I want to
> know...
> 
> First I'm interested with the RT tasks side.
> 
> Imagine, I've 2 tasks :
> - first cyclic task at 10 ms   (priority +)
> - second cyclic task at 100 ms (priority -)
> 
> If my first task take 8 ms to execute at each period (10 ms), then my second
> task will have only 20 ms maximum free time to execute during the free time
> (when task 1 waiting). What I would know is : 80% for task 1. And 10% for
> task 2, if task 2 take 10 ms at each execution...
> 
> For the first task (priority +), I could use 2 getthrtime() at the start and
> the end to have an idea, but for the second task which use free time when the
> first task is not running, how to do ?

probably the only tool that can give you that info for the RT-side is the rtl_tracer - 
rtlinux does not keep an internal time record of how long a task executedas this 
information is not required for operation. Linux maintains this info because it needs 
it to know when a processes time-slot has ben used up. the the top level tracer 
directory for an exapmple.

Alternatively you can get a rough picture by simply having a timestamp at the 
beginning and at the end of each of your tasks and reporting the absolute execution 
time - but that is only usefull if you know exactly which task preemted which one and 
can thus calculate the time it was not running, due to higher prioritized tasks, 
during the reported time.

hofrat
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

Reply via email to