1 / 26

REAL TIME SYSTEMS

what is real time system? how they are scheduled? what is EDF? what is RMA? what is the difference between EDF and RMA?

ysush
Download Presentation

REAL TIME SYSTEMS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. REAL TIME SYSTEM A Real Time System is any information processing system which has to respond to externally generated input stimuli within a finite & specified period. In real time computing , the correctness of the computation depends not only on the logical results but also on the time at which the results are produced.

  2. In RTS a substantial fraction of the design effort goes into making sure that the task deadlines are met. A Deadline is a given time after a triggering event , by which a response has to be completed.

  3. RTS ON THE BASIS OF DEADLINES

  4. Hard Real Time Systems • System should meets the timings constraints. • Response time overrun leads to disastrous damage • Example : Flight Control System SOFT REAL TIME SYSTEMS • Deadline overruns are tolerable, but not desired. • There are no catastrophic consequences of missing one or more deadlines. • Example : Multimedia System

  5. ISSUES IN RTS

  6. SCHEDULABILITY • By task scheduling , we means that a computer’s resources must be shared out equitably among the users. • In general-purpose system , Round robin scheduling is used , which ensures that user does not get a disproportionate share of the computer’s services. • But Round robin scheduling approach does not work in Real Time applications because priority scheduling makes the difference in the two.

  7. CHARACTERSTICS

  8. ASSUMPTIONS MADE IN RTS SCHEDULING A1. No task has any non- preempt able section & cost of preemption is negligible. A2. Only processing requirements are significant; memory, I/O & other resource requirements are negligible. A3. All tasks are independent. A4. The deadline of a task is equal to its period. A5. All the tasks in the task set are periodic.

  9. Earliest Deadline First (EDF) • Optimal uniprocessor algorithm • Also known as Deadline Monotonic Scheduling algorithm • Tasks are preemptable • Dynamic priorities • Scheduler picks task , whose deadline is due next • A set of tasks is schedulable ( in hard real time sense ) , if the total processor utilization is not greater than 1.

  10. NECESSARY & SUFFICIENT CONDITION In EDF , for a task set is said to be schedulable is if it satisfy the following necessary and sufficient condition :

  11. Example Consider 3 periodic processes scheduled using  EDF, the following acceptance test shows that all deadlines will be met.

  12. The utilization will be: U = { ( 1/8 ) + ( 2/5 ) + ( 4/10 ) } = 0.925 ( or 92.5 % ) The theoretical limit for any number of processes is 100% ( or less than 1 ) and so the system is schedulable .

  13. EDF Revisited: Schedulability test Different possible scenarios Sufficient but NOT necessary If di ≥ pi If di < pi Necessary and sufficient Necessary and sufficient ∑ ei/pi≤ 1 ∑ ei/di≤ 1 Fail Pass Schedulable Processor demand Based test

  14. Rate Monotonic Algorithm (RMA) • Static priority based algorithm : tasks scheduled according to priorities • Classical uniprocessor scheduling algorithm • Also called Liu-Layland algorithm or Clock driven uniprocessor algorithm • Tasks are pre-emptable

  15. STATEMENT • It says that if the total utilization of the task is not greater than n(21/n -1) where n stands for number of tasks to be scheduled then RM algorithm will schedule all the task to meet their respective deadlines. • The RMA assigns priorities to the tasks based on their rate of occurrence, i.e. the lower the occurrence rate of the task the lower the priority assigned to it.

  16. In RMA the priority of the task is directly proportional to its rate of occurrence or it is inversely proportional to the period

  17. NECESSARY CONDITION • A set of periodic real time tasks would not be RMA schedulable unless they satisfy the following necessary condition:-

  18. SUFFICIENTCONDITION • Also referred to as Liu and Layland’s condition. • It implies that a set of ‘n’ real time periodic tasks are schedulable under RMA if :

  19. If the set of tasks satisfies this sufficient condition then it is guaranteed that the set of tasks would be RMA schedulable. CASES : Consider the case when • there is only 1 task in the system, i.e., n=1 U1 = 1 • there is 2 tasks in the system, i.e., n=2 U2 = 0.824 • n=∞, applying L’Hospitals Rule ln 2 = 0.69 CONCLUSION: From above computation it is clear that maximum CPU utilization that can be achieved under RMA is 1.

  20. EXAMPLE Consider 3 tasks to be scheduled using  RMA, the following acceptance test determines whether that all deadlines will be met or not.

  21. SOLUTION Checking for the NECESSARY CONDITION : Σ(i=1 to n)Ui = Σ(i=1 to n) ei / pi ≤ 1

  22. Checking for the SUFFICIENT CONDITION : Σ(i=1 to n) Ui ≤ n(21/n -1) For n=3, n(21/n -1) = 3(21/3 -1) = 0.78 < 1 Ui = 0.7 < 0.78 Hence, sufficient condition is satisfied. Therefore, all the given three tasks are schedulable under RMA.

  23. EDF RMA • EDF is also called Deadline-Monotonic Scheduling algorithm • Dynamic priority algorithm • Tasks do not have to be periodic • Full processor can be feasibly scheduled, if utilization of task set is no greater than 1 • It requires a run time overhead. Deteriorates during overload conditions • RMA is also called Liu-Layland algorithm. • Static priority algorithm • All tasks are assumed to be periodic • It lacks flexibility. For e.g. RMA assumes that tasks are infinitely preempt able. • Simpler implementation, even in systems without explicit support for timing constraints (periods, deadlines)

More Related