Hard versus Soft real time system

KamalAcharya 3,800 views 24 slides Nov 08, 2017
Slide 1
Slide 1 of 24
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24

About This Presentation

This slide gives information about the various types of real time system (Hard Real Time System and Soft Real Time System)


Slide Content

Jobs and Processor Release Times ,Deadlines Timing Constraints Hard Real Time System Soft Real Time System Hard Versus Soft Real Time System

Jobs and Processors Each unit of work that is scheduled and executed by the system job is a job. Set of related jobs which jointly provides some system function is called task. Computation of a control law is a job, so is the computation of FFT(Fast Fourier Transform) of sensor data or transmission of data packet or file retrieval and so on.

Rather than using different verbs( Eg . Compute, transmit etc.) for different types of jobs, we say job executes or is executed by system. The jobs mentioned above executes on CPU, network or disk. These all resources are called processor, except in the case where we wanted to be specific.

Release Time Release time of job is instant of time at which the job becomes available for execution. Job can be scheduled and executed any time at or after its release time whenever data and control dependency condition are met. Example: Consider a system which monitors and control several furnaces. After it is initialized(at t=0), it samples and read sensor at every 100msec. Suppose the system begins the first control law computation at 20 msec

The release time of control law computation of job J0,J1…….. J k can be calculated as 20+k*100 where k=0,1,2…….. We say that all jobs have no release time if all the jobs are released when system begins execution

Deadlines The deadline of the job is the instant of time by which its execution is required to be accomplished. In previous example, each control law computation job must be completed by the release time of next job. So their deadlines are 120,220 msec and so on. It is more natural to state the timing requirements of a job in terms of response time i.e the time from release time to instant when it completes.

Maximum allowable response time of a job is relative deadline. In above example relative deadline of every control law computation job mentioned above is 100 msec. The deadline of a job sometimes is also called absolute deadline is equal to release time plus its relative deadline.

Timing Constraints Constraints imposed on the timing behavior of a job is timing constraints. Timing constraint of a job can be specified in terms of release time and relative or absolute deadlines

Hard and Soft Timing Constraints It is common to divide timing constraints into two types: hard and soft. Classification is based on the functions criticality of jobs, usefulness of late result and deterministic or probabilistic nature of the constraints.

Common Definition A timing constraint or deadline is hard if the failure to meet it is considered to be a fatal fault. A hard deadline is imposed on a job if the late result produced by the job after deadline may have disastrous consequences. A few misses of soft deadlines do no serious harm, only the system overall performance decreases. The question of whether timing constraint is hard or soft depend on the seriousness of job.

The distinction between hard and soft timing constraints can also be made in terms of usefulness of the result as the function of tardiness. Tardiness of jobs measures how late it completes respective to its deadline(completion time-deadline). The usefulness of result produced by a soft real time job decreased gradually as tardiness increases. The usefulness of hard real time fall abruptly may even become negative when tardiness becomes larger than 0.

The distinction between two can also be made on the basis of whether it is expressed in deterministic or probabilistic terms. If a job must never miss its deadline, then the deadline is hard. If the deadline can be missed occasionally with some acceptable low probability then its timing constraints is soft.

Hard timing constraints and Temporal QOS The timing constraint of a job is hard, if user requires the validation that the system always meet the timing constraints. By validation we mean demonstration by correct and efficient procedure or by simulation and testing. On the other hand if no validation is required or only demonstration that the job will meet timing constraints specified in terms of statistical values than it is soft timing constraints.

If the user want temporal quality of service provided by the task guaranteed and timing constraints defining the quality validated, then timing constraint is hard. If the user demand best quality of service the system can provide and allow the system to deliver the qualities below what is defined by timing constraints, then the timing constraints are soft. We call application with hard time timing constraints, hard time application and system mostly of hard time application is hard time system.

Hard Time Real System The requirements that all hard time system must be validated places many restrictions on implementation and design of the system.

Some reason for requiring timing guarantee Many embedded system are hard real time. Let us consider automatically controlled train. When it saw red light, action must be activated to stop it at a certain distance from the signal post. This braking distance depend upon the speed and safe deceleration value. This in turn imposes timing constraints on job that sense and process stop signal. No one will question this should be hard and satisfaction must be guaranteed.

Similarly each control law computation of flight controller must be completed in time, otherwise the plane controlled by it may crash. This need validation. Jobs in some non-embedded system also need validation. E.g critical information system. This system must never be down for more than a minute. For this recovery of database and network connection should complete in few seconds.

A real time monitor cannot function properly if some sensor data is lost. A single late recovery job may not cause an information system to crash. We can have more design option and can make system better if some of the hard timing requirements are relaxed even to small degree. If safety or property loss is involved, the designer of the system has burden of proof that bad things will never happen.

More on hard timing constraints There may not be any advantage of completing the job with hard deadline early, as long as job completes by its deadlines. It is often advantageous to keep jitters in response time of jobs small. So we do not want any job to finish too early or too late. We often choose to delay the start and completion of hard real time jobs in favor of soft real time or background jobs.

The definition of hard and soft timing constraints allow hard timing constraints to be specified in any terms: Deterministic Constants(e.g. Relative deadline of every control law computation is 100msec) Probabilistic Constraints(e.g. Probability of response time accessing 100msec is 0.02) Constraints in terms of some usefulness function(e.g. the usefulness of every control law computation is 0.8 or more)

In practice, we mostly use deterministic hard timing constraint. It is easier to validate deterministic timing constraints than probabilistic constraints and those expressed in terms of usefulness functions.

Soft Real Time System A system in which jobs have soft deadlines. Developer rarely required to prove that system surely meet real time performance objective. Examples online transaction system, telephone switches, online games etc. An occasional missed deadline or aborted execution is usually consider tolerable. A system may have critical timing requirements but can be considered to be soft real time.

E.g. Stock price quotation system. Occasional late or missed update are tolerated as a trade off for other factors such as cost, number of users system can serve etc. The timing requirements of soft real time system often specified in probabilistic terms. E.g. In response to our dialing number, the job is design as sequence which must complete in no more than 10s for 95% and no more than 20s for 99.95%.

Final example is multi media system. The video frame of movie must be delivered in time so that it guarantee satisfaction of timing constraints. However user are often willing to tolerate a few glitches as glitches occur rarely and for short time. They are not willing to pay the cost of eliminating glitches. Moreover user of such system rarely demand any quality