Presentation is loading. Please wait.

Presentation is loading. Please wait.

Real-Time Operating System Chapter – 8 Embedded System: An integrated approach.

Similar presentations


Presentation on theme: "Real-Time Operating System Chapter – 8 Embedded System: An integrated approach."— Presentation transcript:

1 Real-Time Operating System Chapter – 8 Embedded System: An integrated approach

2 Real Time Tasks What is Real Time? – Simply, the time measured by physical clock. – Anything is ‘real time’ means it has direct relation with actual time. Real time task: – Performance is judged on basis of time. – Correct result = correct output + correct time Incorrect timing of result leads to : – System failure OR – Reduced QoS

3 Real Time Operating System (Chapter 8) Real Time Tasks – Process control in industrial plants – Robotics – Air Traffic control – Telecommunications – Weapon guidance system e.g. Guided missiles – Medical diagnostic and life support system – Automatic engine control system – Real time data base – Mars Rovers Curiosity : OS – VxWorks, Processor BEA’s RAD 750

4 Real time speech or video processing A speech or moving picture sample of 1 second, if processed in 1 second or in less, makes it real time processing

5 RTOS Question: Is real time systems and embedded systems are same?

6 Terms and definition Release time (or ready time): This is the time instant at which a task(process) is ready or eligible for execution Schedule Time: This is the time instant when a task gets its chance to execute Completion time: This is the time instant when task completes its execution Deadline: This is the instant of time by which the execution of task should get completed. Runtime: The time taken without interruption to complete the task, after the task is released

7 Terms and Definitions Tardiness: Specifies the amount of time by which a task misses its deadline. Its is equal to the difference between completion time and deadline Laxity: Is defined as deadline minus remaining computation time. The laxity of task is the maximum amount of time it can wait and still meets its deadline

8 Soft and Hard Real Time task Hard Real time task: – Task must complete before or at deadline. – Value of completing the task after deadline is zero. Software Real Time – Missing deadline is penalty – Penalty increases as tardiness increase

9 Real Time Operating System (Chapter 8) Types of Real Time Tasks – Hard Real-time task Air traffic control Vehicle subsystems control Nuclear power plant control – Soft Real-time Task Multimedia transmission and reception Networking, telecom (cellular) networks Web sites and services Computer games. – Firm Real Task – Periodic Task – Aperiodic Task – Sporadic Task – Preemptible/Non-Preemptible Tasks

10 RTOS Do an embedded system need an operating system?

11 Real Time Operating System (Chapter 8) Real time in operating systems: – The ability of the operating system to provide a required level of service in a bounded response time. – It responds to inputs immediately(Real-Time). – Here the task is completed within a specified time delay. – In real life situations like controlling traffic signal or a nuclear reactor or an aircraft, – The operating system has to respond quickly.

12 Real Time Operating System (Chapter 8) Characteristic of Real time in operating systems: – Consistency – Reliability – Scalability – Predictability – Performance

13 Real Time Operating System (Chapter 8) Functions of Real time in operating systems: – Task management – Scheduling. – Resource Allocation. – Interrupt Handling.

14 Real Time Operating System (Chapter 8) Scheduling in Real time in operating systems: – No of tasks – Resource Requirements – Release Time – Execution time – Deadlines Rate Monotonic Algorithm Earliest Deadline First Algorithm

15 Real Time Scheduling Algorithms General Purpose Operating System’s Scheduling Algorithms: FCFS, SJF, SRTF, Priority Scheduling, Round Robin Some of them are applicable for RTOS. There more specific RTOS algorithms

16 RTOS Scheduling Classification Real Time Scheduling Off-lineOn-line Static Priority Pre- emptive Non Pre- emptive Dynamic Priority Planning Based Best Effort

17 Off Line Scheduling (Pre Run time scheduling) They generate scheduling information prior to system execution (Deterministic System Model) This scheduling is based on : – Release time – Deadlines – Execution Disadvantage: Inflexibility, If any parameter changes, the policy will have to be redone

18 On-Line Scheduling Number and types of tasks, associated parameters are not known in advance. Scheduling must accommodate dynamic changes Online Scheduling are of two types: – Static Priority – Dynamic Priority

19 Static Priority Tasks with highest priority gets the chance to execute first This can be preemptive or Non-preemptive Non preemptive: task with highest priority runs till it completes. Preemptive: The execution of task can be pre- empted when higher priority task appears in ready queue.

20 Dynamic Priority Priority can be allowed to change at run time Scheduling needs more computation Pre-emption may or may not be used Flexibility is quite high in such system Two subsets: 1. Planning Based: – Guarantees deadline for all accepted task. 2. Best effort algorithm does its best to maximize performance. – Guarantees meeting deadline for hard time task. – Optimizes the performance of soft time task

21 Problem: Static Priority TasksPriorityPeriodCPU Burst T1172 T22174 T33248 Draw the Gantt-chart for scheduling these tasks. Assume the all jobs have same release time Schedule the process to meet their deadline – Without Pre-emption – With Pre-emption Note: Deadline of task is the time when its next burst arrive

22 Rate Monotonic Algorithm Introduced by Liu and Layland in 1973 Assigning priorities as a monotonic function of the rate of a process. (Monotonic means either increasing or decreasing) Priorities are assigned according to increased period of a process. As period increases the priority decreases. The process with lowest period will have highest priority

23 RM Algorithm RM provides simple inequality, to verify the sufficient condition for RM algorithm Where C is CPU Burst, P or T is Period If the condition satisfied, RM will schedule tasks within their respective deadline This is sufficient, but not necessary condition

24 Example CPU utilization for the set of task: LHS : 2/7 + 4/17 + 8/24 = 0.812 RHS : = 3 X (2 1/3 -1)= 3 x.26 =.78 LHS> RHS :RM does not get satisfied But the task still might get schedulable by RM technique TasksPriorityPeriod (T)CPU Burst(C) T1172 T22174 T33248

25 Problem 1 TasksPeriod (P or T)CPU Burst(C) T1154 T2122 T3205

26 Problem 2 TasksPeriodCPU BurstRelease Time T1310 T21031 T31543


Download ppt "Real-Time Operating System Chapter – 8 Embedded System: An integrated approach."

Similar presentations


Ads by Google