Presentation is loading. Please wait.

Presentation is loading. Please wait.

COSC 513 Operating Systems Yue Dou

Similar presentations


Presentation on theme: "COSC 513 Operating Systems Yue Dou"— Presentation transcript:

1 COSC 513 Operating Systems Yue Dou
Real-Time Scheduling COSC 513 Operating Systems Yue Dou

2 Real-Time System Robotics Air traffic control
Military command and control systems Space station Undersea exploration

3 Correctness of Real-Time System
Correctness of the real-time system depends not only on the logical result of the computation, but also on the time at which the results are produced

4 Used Terms Hard real-time task: must meet its deadline ( deadline specifies either a start time or a completion time) Soft real-time task: has an associated deadline that is desirable but not mandatory, it still makes sense to schedule and complete the task even if it has passed its deadline

5 Five Characteristics of Real-Time Operating System
Determinism : concerned with how long an operating system delays before acknowledging an interrupt Responsiveness : concerned with how long after acknowledgment, it takes an operating system to finish the interrupt service routine Determinism and responsiveness together make up the response time to external events which are critical for real-time systems

6 Five Characteristics of Real-Time Operating System (cont.)
User control: allow the user fine-grained control over task priority Reliability: a transient failure may cause financial loss or major equipment damage or even loss of life. Fail-soft operation: when data corruption happen, system should attempt corrective action and same time continues operation perhaps at a reduced level of service

7 Two Popular Classes of Scheduling Algorithms (1)
Deadline Scheduling: the task which has the earliest deadline, will be scheduled first

8 Example of Deadline Scheduling
A system that collects and processes data from two sensors, A and B. The deadline for collecting data from sensor A must be met every 20 ms, and that for B every 50 ms. It takes 10 ms to process each sample of data from A and 25 ms to process each sample of data from B.

9 Example of Deadline Scheduling (cont.)

10 Two Popular Classes of Scheduling Algorithms ( 2 )
Rate Monotonic Scheduling ( RMS ): used for resolving multitask scheduling conflicts for periodic tasks, it assigns priorities to tasks on the basis of their periods ( rate = 1 / periods )

11 High Rate, High Priority ( rate monotonic )

12 Bound Equation C1/T1 + C2/T2 +….+Cn/Tn <= n(21/n – 1)
Cn: processing time for each task Tn: each task’s period Cn/Tn: utilization of the processor

13 Example of Rate Monotonic Scheduling
P1: C1 = 20; T1= 100; C1/T1= 0.2 P2: C2 = 40; T2=150; C1/T1= 0.267 P3: C3= 100; T3=350; C1/T1= 0.286 Total utilization = 0.753 Since: <= 3 (21/3 – 1) = 0.779 So, if RMS is used, all tasks will be successfully scheduled


Download ppt "COSC 513 Operating Systems Yue Dou"

Similar presentations


Ads by Google