HARD REAL TIME PYTHON

bieffe62 at gmail.com bieffe62 at gmail.com
Tue Oct 7 04:42:48 EDT 2008


On 7 Ott, 01:25, "Blubaugh, David A." <dbluba... at belcan.com> wrote:
> To All,
>
> I have done some additional research into the possibility of utilizing
> Python for hard real time development.  I have seen on various websites
> where this has been discussed before on the internet.  However, I was
> wondering as to how successful anyone has truly been in developing a
> program project either in windows or in Linux that was or extremely
> close to real time constraints? For example is it possible to develop a
> python program that can address an interrupt or execute an operation
> within 70 Hz or less?? Are there any additional considerations that I
> should investigate first regarding this matter??
>
> Thanks,
>
> David Blubaugh
>
> This e-mail transmission contains information that is confidential and may be
> privileged. It is intended only for the addressee(s) named above. If you receive
> this e-mail in error, please do not read, copy or disseminate it in any manner.
> If you are not the intended recipient, any disclosure, copying, distribution or
> use of the contents of this information is prohibited. Please reply to the
> message immediately by informing the sender that the message was misdirected.
> After replying, please erase it from your computer system. Your assistance in
> correcting this error is appreciated.

AFAIK, the requirement for hard real time, is that response time have
to be predictable, rather than
generally 'fast'.
Very high level languages like python use many features which are by
their nature unpredictable or
difficult to predict in their response times: to name a pair, garbage
collection and hash table lookups.
Usually real time programmers tend not to use these features even when
they program with lower level
languages such as C, ot at least to use them only during
initialization, when being predictable is less
important.

So no, I would not use python for hard real time ...
Said that, I have to say that once used python to simulate  the
protocol of a device which my code (in ADA) had to interface. Typical
response times in this protocol was about 10ms, and my small python
simulator usually managed to respond in that time, although sometime
it delayed its response causing the response timeout in my code to
expire ...


Ciao
-----
FB



More information about the Python-list mailing list