Managing RTEMS time in a paravirtualized environment

Joel Sherrill joel at rtems.org
Fri Apr 22 00:27:15 UTC 2016


Hi

Gedare and I are working on a paravirtualized RTEMS executing in an ARINC
653
partition. One challenge is ensuring the time passage in RTEMS is correct.
The
problem in a nutshell is that RTEMS is not executing the entire time. Each
partition is an independent RTEMS instance. There will be no "ticks" while
an RTEMS partition is executing.

Consider this basic scenario.

+ Time Window 1 - RTEMS runs
+ TIme Window 2 .. n-1 - other applications run
+ Time Window n - RTEMS runs again

We do not have a periodic interrupt which is documented in #2271
as a requirement.

Additionally we can ask the underlying protection kernel for the value of
a nanoseconds counter. We see this as satisfying the requirement for
a running counter.

Time WIndow 1 can end because RTEMS either voluntarily yielded the time
window
or because it used its entire time budge. Either way, when it runs again in
Time
Window N, we can determine how much time has passed from the beginning of
Time Window 1 to the beginning of Time Window N.

Our working assumption is that we will advance time at the beginning of each
time window. The length of time advanced should be assumed to be variable.

We have control over a recommended configure vaiue for nanoseconds per
tick and I am thinking always using 1 millisecond and calling clock tick the
proper number of times on each time windows entry.

Another challenge is ensuring the implementation does not include
non-RTEMS time windows in the CPU time statistics of the thread
that was executing at the end of one time windows and beginning
of our next one.

Any thoughts on how to best manage this variable clock tick?

Thanks.

--joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20160421/86c08278/attachment.html>


More information about the devel mailing list