views:

74

answers:

1

What constitutes a real-time system? How does one know if the program they are writing is properly termed, "real-time"?

Note: I am asking this question because there is no wiki for the tag real-time, and I don't have the juice to edit the wiki, for some reason. Maybe one of you does, and can put a definition there... Folks use this term in two very different ways (see my answer) which makes the real-time tag a sort of bimodal, schizophrenic thing. I wonder if there's a more distinct term that could be used for real-time-in-the-sense-of-time-constraints Q&A.

+1  A: 

The term real-time is used in at least two distinct ways when referring to computer systems:

  • In the academic sense of real-time, a program or system is "real-time" when it is subject to execution time constraints, such as deadlines. Such systems are broken down into soft and hard real-time. Correctness of an implementation depends not only on the values produced by the program, but on the time at which those values are produced.

    • Hard real-time systems are those in which no deviation from the time constraints (e.g., missed deadlines) are tolerable, and any failure constitutes a complete failure of the system.
    • Soft real-time systems tolerate some degree of deviation from the time constraints, for example media streaming systems, in which some late packets may degrade the quality transiently, but still produce an acceptable execution.
  • As a synonym for "on-line", wherein the program must respond to events "in real-time", whether or not there is an actual time constraint involved. (e.g., real-time stock quotes or whatever.)

Wikipedia has a useful discussion.

I'll note that within my company, we've begun using the term time-critical or dynamic time-critical instead, to denote systems that have real time constraints. We've edged away from using the term real-time because it implies determinism (which is not always required or even desired) and it also has the baggage of some very specific theory and implementation history. Nevertheless, we have highly dynamic systems which have time constraints, and we spend a great deal of time engineering them using a combination of hard and soft real-time approaches and custom hacks.

If I have a system with well-defined tasks, and I want to say that task X must complete by time t with probability 0.95, is that a hard or a soft real-time task?

andersoj
Answering my own question to get things started. Happy for someone else to provide a clearer or more nuanced definition.
andersoj