Realtime capabilities?

Peter Hansen peter at engcorp.com
Sat Sep 22 15:44:44 EDT 2001


Aahz Maruch wrote:
> 
> In article <9o8033$mhf$04$1 at news.t-online.com>, Ben  <ben at xyz.net> wrote:
> >
> >some of you have probably heard (or even used) Erlang (www.erlang.org) ---
> >a functional programming language which is executed by a virtual machine.
> >One interesting property of this VM is guaranteed soft realtime execution
> >of the Erlang processes.
> >
> >My question is whether it is possible to add (soft) realtime capabilities
> >to the Python VM with reasonable effort? I'm just curious and not being an
> >expert of any of the existing Python implementations I thought some of you
> >might have a better understanding of this issue and can comment on this?

We might be better guided by the terminology as defined by those 
who actually _do_ realtime work, as opposed to whatever it is
these Erlang people are (those who just write about it?).

By definition "soft" realtime is *without* a guarantee.  If it has
a guarantee as to how long each operation will take, or how long
the longest operation will take, or how long each series of 
operations in a program will take, it is by definition "hard" realtime.
All "hard" means is deterministic, or guaranteed.  Soft means
nothing more than "fast enough, often enough" (or as Tim Peters
quotes, it means "basically nothing").

Python is definitely suitable for "soft" realtime applications,
by any definition of "soft" the realtime people generally accept.
I use it in several complex "soft" realtime applications.

No language is suitable for hard realtime without a hard
realtime operating system underlying it (unless you dispense with
operating systems entirely, as in an embedded system).  Either 
Python or Erlang could probably be used for hard realtime work with 
adequate analysis and measurement, since all you really need to do 
is guarantee the maximum duration of each of the operations 
performed _in the actual application_.  If there are no operations 
which are used in the program which have unbounded execution times, 
then it is possible to guarantee the response time to an external 
stimulus, meaning you can call it "hard" realtime.

-- 
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com



More information about the Python-list mailing list