Page 66 - The Art of Designing Embedded Systems
P. 66

CHAPTER 4



                        Real Time Means

                        Right Now!
















                        We’re taught to think of our code in the procedural domain: that of
                    actions and effects. IF statements and control loops create a logical flow to
                    implement  algorithms and applications. There’s a not-so-subtle  bias  in
                   college toward viewing correctness as being nothing more than stringing
                   the right statements together.
                        Yet embedded systems are the realm of real time, where getting the
                   result on time is just as important as computing the correct answer.
                        A hard real-time task or system is one where an activity simply must
                    be completed-always-by   a specified deadline. The deadline may be a
                    particular time or time interval, or may be the arrival of some event. Hard
                   real-time tasks fail, by definition, if they miss such a deadline.
                        Notice that this definition makes no assumptions about the frequency
                   or period of the tasks. A microsecond or a week-if   missing the deadline
                    induces failure, then the task has hard real-time requirements.
                        “Soft” real time, though, has a definition as weak as its name. By
                   convention it’s those class of  systems that are not hard real time, though
                   generally there is some sort of timeliness requirement. If missing a dead-
                    line won’t compromise the integrity of the system, if generally getting the
                   output in a timely manner is acceptable, then the application’s real-time re-
                   quirements are “soft.” Sometimes soft real-time systems are those where
                   multi-valued timeliness is acceptable: bad, better, and best responses are
                   all within the scope of possible system operation,






                                                                                  53
   61   62   63   64   65   66   67   68   69   70   71