Skinpress Rss

Thursday, November 29, 2012

Basic Real-Time Concepts -- Real-Time Definitions

0

Real-Time Definitions


Definition: A real-time system is a system that must satisfy explicit (bounded) response-time constraints or risk severe consequences, including failure.
 
What is a “failed” system? In the case of the space shuttle or a nuclear plant, it is painfully obvious when a failure has occurred. For other systems, such as an automatic bank teller machine, the notion of failure is less clear. For now, failure will be defined as the “inability of the system to perform according to system specification,” or, more formally:
 
Definition: A failed system is a system that cannot satisfy one or more of the requirements stipulated in the formal system specification.
 
Because of this definition of failure, precise specification of the system operating criteria, including timing constraints, is important. This matter is dis- cussed later.
 
Various other definitions exist for real-time, depending on which source is consulted. Nonetheless, the common theme among all definitions is that the system must satisfy deadline constraints in order t be correct. For example, an alternative definition might be:
 
Definition: A real-time system is one whose logical correctness is based
on both the correctness of the outputs and their timeliness.
 
In any case, note that by making unnecessary the notion of timeliness, every ystem becomes a real-time system.
 
Real-time systems are often reactive or embedded systems. Reactive systems are those in which scheduling is driven by ongoing interaction with their environment; for example, a fire-control system reacts to buttons pressed by a pilot. Embedded systems are those that are found in a system that is not itself a computer. For example, a modern automobile contains many embedded computers that control fuel injection, airbag deployment, braking, climate control, and so forth. Today, many household items such as televisions, stereos, washing machines, even toys contain embedded computers. It is clear that sophisticated systems such as aircraft, spacecraft, and industrial machines must contain many embedded, reactive computer systems.
 
The three systems mentioned earlier satisfy the criteria for a real-time system precisely. An aircraft must process accelerometer data within a certain period that depends on the specifications of the aircraft; for example, every 10 milliseconds. Failure to do so could result in a false position or velocity indication and cause the aircraft to go off-course at best or crash at worst. For a nuclear reactor thermal problem, failure to respond swiftly could result in a meltdown. Finally, an airline reservation system must be able to handle a surge of passenger requests within the passenger’s perception of a reasonable time (or before the flights leave the gate). In short, a system does not have to process data in microseconds to be considered real-time; it must simply have response times that are constrained.
 
When Is a System Real-Time?
 
It can be argued that all practical systems are real-time systems. Even a batch-oriented system – for example, grade processing at the end of a semester or a bimonthly payroll run – is real-time. Although the system may have response times of days or weeks (e.g., the time that elapses between submitting the grade or payroll information and issuance of the report card or check), it must respond within a certain time or there could be an academic or financial disaster. Even a word-processing program should respond to commands within a reasonable amount of time (e.g., 1 second), or it will become torturous to use. Most of the literature refers to such systems as soft real-time systems.
 
Definition: A soft real-time system is one in which performance is degraded but not destroyed by failure to meet response-time constraints.
Conversely, systems where failure to meet response-time constraints leads to complete and catastrophic system failure are called hard real-time systems.
 
Definition: A hard real-time system is one in which failure to meet a single deadline may lead to complete and catastrophic system failure
 
 
Firm real-time systems are those systems with hard deadlines where some arbitrarily small number of missed deadlines can be tolerated.
 
Definition: A firm real-time system is one in which a few missed deadlines
will not lead to total failure, but missing more than a few may lead to
complete and catastrophic system failure.


As noted, all practical systems minimally represent soft real-time systems. Table above gives a sampling of hard, firm, and soft real-time systems.
 
Note that there is a great deal of latitude for interpretation of hard, firm, and soft real-time systems. For example, in the automated teller machine, missing too many deadlines will lead to significant customer dissatisfaction and potentially even enough loss of business to threaten the existence of the bank. This extreme scenario represents the fact that every system can probably be characterized any way – soft, firm, or hard – real-time by the construction of a supporting scenario. The careful construction of systems requirements (and, hence, expectations) is the key to setting and meeting realistic deadline expectations. In any case, it is a principal goal of real-time systems engineering to find ways to transform hard deadlines into firm ones, and firm ones into soft ones.
 
The Nature of Time
 
It is typical, in studying real-time systems, to consider the nature of time, because deadlines are instants in time. But the question arises, “Where do the deadlines come from?” Generally speaking, deadlines are based on the underlying physical phenomena of the system under control. For example, in animated displays, images must be updated at approximately 30 frames per second to provide continuous motion, because the human eye can resolve updating at a slower rate. In navigation systems, accelerations must be read at a rate that is based on the maximum velocity of the vehicle, and so on. In some cases, systems have deadlines that are imposed on them that are based on nothing less than guessing or on some forgotten and since eliminated requirement. The problem in these cases is that the undue constraints may be placed on the systems. This is a primary maxim of real-time systems design – to understand the basis and nature of the timing constraints, so that they can be relaxed if necessary.
 
Many real-time systems utilize time-stamping and global clocks for synchronization, task initiation, and data marking. It must be noted, however, that clocks keep inaccurate time; even the official U.S. atomic clock must be adjusted. More- over, there is an associated digitization error with clocks, which may need to be considered when using them for data time-stamping.
 
 

0 comments:

Post a Comment