Sunteți pe pagina 1din 15

Definition: A real-time system is one in which a substantial fraction of the design effort goes into making sure that

the task deadlines are met. In other words, a real-time system is required to complete its work or deliver its services on a timely basis or within an acceptable response time. In such a system, if the task deadlines are not met (mal-function), the result may be: ^ Serious consequences ^ Degraded performance Examples of Real-time Systems Embedded systems controlling nuclear reactors controlling chemical power plants controlling jet engines controlling aircrafts Devices monitoring blood pressure monitoring heartbeats monitoring sugar levels Electronic games Response time important Real-time databases

Database contains data objects that represent realworld objects, e.g, the position and heading of an aircraft. Such real-time data is perishable, that is, if they are not updated, they deviate from the actual position and heading, resulting in inconsistencies. Compared with non-real databases, the data is still consistent if the updates are late e.g payroll. Radar Signal Processing A radar points its antenna in one direction and sends short frequency pulse. From examining the echo signal (its presence, its strength and Doppler shift), the system can determine/compute if there are objects, their positions and velocities. The real-time component is that these tasks are to be performed at disjoint intervals for other directions as well. Multimedia Applications Displaying video Video is displayed frame by frame (60 per sec). The tasks between showing two frames consists sampling, encoding, compression/decompression, storage and transmission. The real-time constraints are imposed b the resolution and frame rate.

Lip synchronization (Temporal Synchronization) Presentation of the video frame and the corresponding audio segment should be within a time bound (160 ms). Sending audio over the network Audio/video should be presented without discontinuities or pauses, which occur due to jitters in network delays.

Hard v/s Soft real-time systems Hard The right results late are wrong! On-time = nanoseconds, microseconds, days Worst-case performance is important Catastrophic failure if deadline not met Safety-critical Soft The right results late are of less value than right results on time. More they are late, less the value, but do not constitute system failure Usually average case performance is important Failure not catastrophic, but impacts service quality e.g. connection timing out, display update in games

Tasks are usually associated with some value functions:

General Timing Constraints

Two categories of timing constraints Performance constraints: set limits on response time of the system Behavioral constraints: make demand on the rate at which users supply stimuli to the system Further classification: three types of temporal restrictions (not mutually exclusive) Maximum: no more than t amount of time may elapse between the occurrence of one event and the occurrence of another Minimum: No less than t amount of time may elapse between two events Durational: an event must occur for t amount of time
Note: Event is either a stimulus to the system from its environment, or is an externally
observable response that the system makes to its environment

Maximum Timing Constraints


A. S-S combination: a max time is allowed between the occurrences of two stimuli

e.g. 2nd digit must be dialed no later than 20s after the 1st digit

B. S-R combination: a max time is allowed between the arrival of a stimulus and the systems response

e.g. the caller shall receive a dial tone no later than 2s after lifting the phone receiver

C. R-S combination: a max time is allowed between a systems response and the next stimulus from the environment

e.g. after receiving the dial tone, the caller shall dial the first digit within 30s

D. R-R combination: a max time is allowed between two systems responses

e.g. after a connection is made, the caller will receive a ringback tone no more than 0.5s after the callee has received a ring tone

Minimum Timing Constraints

Examples of Durational Constraint stimulus or response expressed as a duration e.g. to get back to the operator, press the button for at least 15s (but not more than 30s); to get the dial tone press the button for more than 30s. Notice: A and C are behavioral requirements Constraints on users If the user fails to generate the required stimulus within the prescribed time, the system will take a specific course of action B and D are system performance requirements Structure of a Real-time System

Controlled process is an activity being monitored or controlled. Sensors provide inputs (stimuli) to the controller by acquiring state information of the controlled process and the operating environment. Joblist contains the list of tasks preloaded in the memory of a processor. Trigger generator is a representation of the mechanism used to trigger the execution of individual jobs Execution is the computing resource or computer that runs the tasks according to a schedule. The output of the execution is fed to the actuators (basically, a response to a stimuli) and the displays. Actuators have high time constants. Operator can initiate a job on command, apart from those in the joblist. Performance Measures for Real-time Systems Real-time systems are often used in critical applications and therefore must be carefully designed and validated before being put into operation. Validation is possible if there exists a well-chosen set of appropriate performance

measures that are crucial to the characterization of performance. Properties of Performance Measures: Represents an efficient encoding of relevant information, that is, being relevant and congruent to the application Permits ranking of systems (being quantitative measures) Provide objective optimization criteria for design Represent verifiable facts

Traditional Performance measures Reliability Availability Throughput Such measures are useless for real-time systems because they are based only on the outcome. <Give example of car and driver> Performance measures should measure the goodness of the outcome relative the best outcome possible under the circumstances. The controlled process is defined as having several accomplishment levels. The performability of the real-time system is defined as the probability that the system will allow each accomplishment level to be met. More formally, if there are n accomplishment levels A A ...... A , the performability of the real-time system is 1 2 n given by the vector (P(A1), P(A2) , .,P(An)), where P(Ai) is the probability the system reaches accomplishment level Ai. View 0 View 1 View 2 View 3 Users view Accomplishment of various controlled-process tasks as a function of operating environment Capacity of real-time computer to execute algorithms for various controlled-process tasks Hardware Structure; OS

Other Performance Measures Feasibility A valid schedule is a feasible schedule if every job completes by its deadline. It is frequently used for hard-real scheduling algorithms. Response time It is the time difference between the release of a job and its completion. It is frequently used for jobs with soft deadlines. Miss rate/ Loss rate Miss rate gives the percentage of jobs that are executed but completed late. Loss rate gives the percentage of jobs that are discarded. Some schedulers may choose to discard some jobs at least to complete others in time. The scheduler may - increase loss rate to decrease miss rate (more jobs complete in time) - increase miss rate to reduce loss rate (more jobs complete even though late) Average tardiness

Tardiness of a task is defined as the difference between its deadline and its completion. Some algorithms may be measured by their average tardiness (or maximum tardiness).

S-ar putea să vă placă și