Page 1 of 1

Real Time

Posted: Fri Oct 16, 2015 4:28 pm
by Esperanto
Hi everybody,
I'm new to this forum and to Chibios. I'm 65 but not an expert. I'm enjoing the availability of documentation about Chibios but I've not yet found the proper sequence of exploration of the Chibios secrets.
Going through the documentation I found a definition I'ld like to comment.
Here below the original sentences and below my comments:


Non Real Time systems
A non real time system is a system where there are no deadlines involved. Non-RT systems could be described as follow:

“A non real time system is a system where the programmed reaction to an event will certainly happen sometime in the future”.
Soft Real Time systems
A Soft real time system is a system where not meeting a deadline can have undesirable but not catastrophic effects, a performance degradation for example. SRTs could be described as follow:

“A soft real time system is a system where the programmed reaction to an event is almost always completed within a known finite time”.

Hard Real Time systems
An Hard Real Time (HRT) system is a system where not meeting a deadline can have catastrophic effects. HRT systems require a much more strict definition and could be described as follow:

“An hard real time system is a system where the programmed reaction to an even is guaranteed to be completed within a known finite time”.

My considerations come from back to the 80's when I was paied differently when writing Real Time instructions and Non-Real Time Instructions ;-((
You can understand the mess..... is a multiplication Real Time or NON-Real Time? this is the dilemma!!!
Then my comment, to day, is based on my professor answer: A Real Time code is such when changing the excution time the result whould change. Result is the final effect. This definition resembles the one you gave but to be completely correct I would suggest the following wording:
“An hard real time system is a system where the programmed reaction to an event must be guaranteed to be completed within a known finite time otherwise correct performance are not guaranteed”

An example is computing the speed and trajectory of a target if you want to hit it. If the time you spend to make your calculation is too long, you'll miss the target (wrong result). Another example could be for a PaceMaker: If hart beat delays more than 16 msec to arrive, generate an artificial one". So using the wording MUST BE COMPLETED instead of IS COMPLETED would provide more sense to the "Hard Real Time" concept.

Sorry if my first appearence is done making comments instead of asking support; this will surely come later. For the moment I'm digging into the documentation and enjoing my learning.
My sincere congratulations for the amount of very good and clear documentation. Going through is hard but I'm convinced it would be a great learning.
Thanks for providing this material.
Esperanto

Re: Real Time

Posted: Fri Oct 16, 2015 5:50 pm
by Giovanni
No problems.

I replaced "is" with "must be", I agree on the change.

Multiplications or other instructions requiring a variable number of cycles can be used in an hard realtime system as long as the best/worst case execution time is known. Hard realtime does not require constant execution time in my opinion, you need to define your time boundaries and demonstrate that your system is strictly within specs.

Giovanni