Presentation is loading. Please wait.

Presentation is loading. Please wait.

Department of Computer Science & Engineering

Similar presentations


Presentation on theme: "Department of Computer Science & Engineering"— Presentation transcript:

1 Department of Computer Science & Engineering
CSCE 790i Final Project Performance of Algorithms for Scheduling Soft Real Time System Presented by: Linwei Niu Department of Computer Science & Engineering Instructor: Dr. Wang Frequently, presenters must deliver material of a technical nature to an audience unfamiliar with the topic or vocabulary. The material may be complex or heavy with detail. To present technical material effectively, use the following guidelines from Dale Carnegie Training®. Consider the amount of time available and prepare to organize your material. Narrow your topic. Divide your presentation into clear segments. Follow a logical progression. Maintain your focus throughout. Close the presentation with a summary, repetition of the key steps, or a logical conclusion. Keep your audience in mind at all times. For example, be sure data is clear and information is relevant. Keep the level of detail and vocabulary appropriate for the audience. Use visuals to support key points or steps. Keep alert to the needs of your listeners, and you will have a more receptive audience. November 23, 2018

2 Outline Brief Introduction to Real Time System Scheduling
Schedulability Scheduling policies Scheduling algorithms Performance Comparison by simulation Conclusion Question Time Acknowledgement In your opening, establish the relevancy of the topic to the audience. Give a brief preview of the presentation and establish value for the listeners. Take into account your audience’s interest and expertise in the topic when choosing your vocabulary, examples, and illustrations. Focus on the importance of the topic to your audience, and you will have more attentive listeners. November 23, 2018

3 Introduction to Real Time System
Real time means “Real fast “ - the correctness of the computation depends on both the result and the time it consumed. Hard real time system - No deadline missing is allowed Soft real time system - Occasionally deadline missing is tolerable with some constraint Determine the best close for your audience and your presentation. Close with a summary; offer options; recommend a strategy; suggest a plan; set a goal. Keep your focus throughout your presentation, and you will more likely achieve your purpose. November 23, 2018

4 Real time scheduling Given
- a set of tasks (or jobs) with Timing specifications Arrange - the running of each task (or job) such that the timing requirement can be met. November 23, 2018

5 Connections between Real Time Scheduling and Image Processing
Vedio Conference Remote medical treatment Online Vedio stream of movies - each image frame can be considered as a real time job. - Soft real time systems (occasionally frame missing is tolerable). - QoS needs to be guaranteed. Determine the best close for your audience and your presentation. Close with a summary; offer options; recommend a strategy; suggest a plan; set a goal. Keep your focus throughout your presentation, and you will more likely achieve your purpose. November 23, 2018

6 What does this project focus on ?
Scheduling soft real time system - occasionally deadline missing is allowed - Quality of Service needs to be guaranteed. November 23, 2018

7 System Process Model Oi the reaease time of the first job
Given a set of periodic tasks . Each task, say ti is characterized by some parameters Oi the reaease time of the first job Ti the period of the task Di the deadline of each job, Di = Ti Ci the execution time of the job mi and ki the QoS constraint of task ti November 23, 2018

8 An Example of Schedule T1=D1=4 C1=1 T2=D2=10 C2=2 T3=D3=15 D3=6 4 8 12
16 10 15 November 23, 2018

9 Scheduling Policy Priority Driven Fixed Priority strategy Preemptive
- the one with the highest priority is always executed Fixed Priority strategy Preemptive - low priority task can be preempted by high priority task during its running time Uniprocessor enviorenment November 23, 2018

10 An Example of Schedule T1=D1=4 C1=1 T2=D2=10 C2=2 T3=D3=15 D3=6 4 8 12
16 10 15 November 23, 2018

11 Quality of Service Constraint
When the processor resource is limited while the workload is high, not all jobs can be completed before its deadline, what to do? Using QoS constraint - Out of every k consecutive jobs, we need to guarantee at least m jobs are finished before their deadlines, otherwise the schedule failed. November 23, 2018

12 How to guarantee ? Weakly hard strategy
Two well known existing strategies : Weakly hard strategy - all jobs are executed after they arrive , but only those jobs that finished by their deadlines are counted (m , k) strategy - partition the jobs into two categories: mandatory ones and optional ones. Mandatory ones always preempts optional ones and are required to finish by their deadlines. November 23, 2018

13 Weakly hard scheduling
Determine the QoS by exact timing analysis All jobs of the tasks are executed after they arrive until they are finished even if they have missed the deadline. November 23, 2018

14 Exact Timing Analysis Give a task ti, the k’th instance (called a job) of the task is represented by - Si(k): the start time of the job; - Fi(k): the finish time of the job; - Ri(k): the worst case response time of the job, Ri(k) = Fi(k) - Si(k). November 23, 2018

15 Exact Timing Analysis how to compute Si(k)?
- Si(k) = ( k – 1) Ti + Oi ; how to compute t = Fi(k)? - t = kCi + Intfi(t) + idlei(t) November 23, 2018

16 An Example of Schedule T1=D1=4 C1=1 T2=D2=10 C2=2 T3=D3=15 D3=6 4 8 12
16 10 15 November 23, 2018

17 Exact Timing Analysis how to compute Intfi(t) ? November 23, 2018

18 Exact Timing Analysis how to compute idlei(t) ?
- using a virtual task to consume the idle time November 23, 2018

19 Exact Timing Analysis get the value of finish time t = Fi(k)
- t = kCi + Intfi(t) + idlei(t) then we can tell whether the job meet the deadline? - simply check whether its response time is less than the deadline. November 23, 2018

20 Exact Timing Analysis use µ-Pattern to represent if the job can meet the deadline November 23, 2018

21 Check The Constraint After we compute the U-pattern of each job of a task, we got some pattern like this “ …” Do this pattern meet the constraint of (2,4)? How to check ? - Using a sliding window to check the resulting pattern. If within each window the constrain is met, than we say this task meet the QoS constraint required. Otherwise if within any window it’s not met, then failed. November 23, 2018

22 How many patterns needs to be computed ?
We need to compute all the jobs within the least common multiple(LCM) of all the tasks’ periods. Some optimization method can be adopted to speed the computation. November 23, 2018

23 Exact Timing Analysis Advantages Disadvantages
- the job execution result can be well predicted offline; - No simulation is needed. Disadvantages - some jobs are still executed until they finished even if it will miss the deadline; - cannot deal with task sets with very high workloads, e.g. overloaded system. - How to deal with it ? November 23, 2018

24 (m, k ) Scheduling Mandatory jobs Optional jobs
All jobs are partitioned into two categories: Mandatory jobs - Can always preempt the optional jobs, each mandatory job is required to meet the deadline Optional jobs - Assigned to the lowest priority, deadline missing is allowed. November 23, 2018

25 (m, k ) Scheduling How to guarantee the QoS constraint?
- Within any k consecutive jobs, at least m jobs must be partitioned as mandatory jobs. So long as all the mandatory jobs meet the deadline, the constraint is guaranteed. - Any mandatory job missing the deadline will cause the task schedule to fail. November 23, 2018

26 (m, k ) Scheduling How to achieve this goal?
- let πij represent the pattern of the j’ th job of task ti , then πij is categorized by ( “1” represent mandatory job, “0” represent optional job): November 23, 2018

27 (m, k ) Scheduling Mandatory jobs are evenly distributed
some characteristics of this kind of partition: Mandatory jobs are evenly distributed e.g. “ … “ for constraint of (3,6) The first job are always designated as Mandatory jobs The mandatory jobs always appear periodicly - the period of each mandatory job is kiTi e.g. “ …” for constraint of (2,3) November 23, 2018

28 (m, k ) Scheduling Advantages
- Only need to guarantee the “mandatory” jobs, so the schedulability of task sets are greatly improved - Can schedule task sets with very high workloads, even the overloaded systesm. November 23, 2018

29 Problems with this partitioning method:
The first job are always designated as Mandatory jobs - which makes the task set harder to schedule Mandatory jobs are evenly distributed - some time such kind of pattern doesn’t work while unevenly pattern works better The patterns are fixed once the constraint given - which makes it lack of flexibility November 23, 2018

30 Example of (m,k) schecule
1 1 1 1 1 T1=D1=2 C1=2,m1=3,k1=6 T2=D2=6 C2=6,m2=1,k2=2 6 12 18 1 6 12 1 1 1 1 1 1 6 12 18 1 6 12 November 23, 2018

31 How to improve it ? Shift the Mandatory jobs away to make it easier to schedule the low priority jobs How ? November 23, 2018

32 Shift The Mandatory Jobs Away
1 1 T1=D1=6 C1=4,m1=1,k1=2 T2=D2=6 C2=4,m2=1,k2=2 6 12 18 1 1 1 6 12 18 1 1 6 12 18 1 1 6 12 18 November 23, 2018

33 Any other problem ? By shifting the mandatory jobs as far as possible, the task sets become much easier to schedule. However, the problem of evenly distribution pattern still exists Can we do better ? November 23, 2018

34 Our New Approach Using exact timing analysis to choose the pattern for (m, k) schedule In this way, we combine the advantages of both methods November 23, 2018

35 A Motivation Example T1=D1=2 C1=2,m1=3,k1=6 T2=D2=6 C2=4,m2=1,k2=2
1 1 1 1 T1=D1=2 C1=2,m1=3,k1=6 T2=D2=6 C2=4,m2=1,k2=2 6 12 18 1 6 12 First decide whether a job can meet the deadline by offline computation. One job will be designated as “mandatory” job only when it can meet the deadline (already know) 1 1 1 1 1 6 12 18 1 6 12 November 23, 2018

36 Another Motivation Example
1 1 1 1 1 T1=D1=2 C1=2,m1=3,k1=6 T2=D2=6 C2=6,m2=1,k2=2 6 12 18 1 6 12 1 1 1 1 1 1 6 12 18 1 6 12 November 23, 2018

37 How to implement Using (m,k) scheduling pattern as a start point to choose the new pattern - first we check whether the existing (m,k) pattern of each task is “good” by offline computation. If it is, we keep it and use it to compute the pattern for lower priority tasks; if not, i.e., it cannot guarantee all mandatory jobs to meet the deadline, then we adjust the pattern with our computation result. November 23, 2018

38 How to implement Basically, we need to compute with each mandatory job to decide in advance whether it can meet the deadline. How ? - We still use the Si(k), Fi(k), Ri(k) in the weakly hard strategy , but we will incorporate the π Pattern in the (m,k) scheudling strategy to it November 23, 2018

39 New Approach how to compute Si(k)? - Si(k) = ( k – 1) Ti + Oi ;
November 23, 2018

40 New Approach how to compute t = Fi(k)? November 23, 2018

41 New Approach how to compute the Intfi(t)? November 23, 2018

42 New Approach how to compute idlei(t) ?
- using a virtual task to consume the idle time November 23, 2018

43 New Approach How to get the worst case response time of the job ?
Ri(k) = Fi(k) – Si(k) November 23, 2018

44 New Approach After we got the worst case response time of the job, we can compute the µ-pattern of this job by November 23, 2018

45 New Approach After we compute the µ-pattern of each job of the current task, we can determine the (m, k) pattern of this job according to it µ-pattern - basically, we only chose those jobs whose corresponding µ-pattern is “1” to be mandatory jobs. November 23, 2018

46 One example Consider a task ti with (m,k) constraint of (3,5),supoose the µ-pattern we compute for it is “ ”, then no evenly distributed pattern of “10101” will work. In this case the we can choose the (m,k)-pattern for this task to be “11001” November 23, 2018

47 New Approach Advantages
- more flexible in choosing (m, k)-pattern for a task set - schedulability of the task set is greatly improved. (see the experiment results) - all work can be done offline. - After we determine the (m,k) pattern of the task sets, we immediately know whether it’s schedulable or not . November 23, 2018

48 Experiment Result November 23, 2018

49 Comparison of Schedulability
November 23, 2018

50 Conclusion Experiment results show that our new approach greatly improved the schedulability of overloaded task sets. In this project, the performance of two well known soft real time scheduling algorithm are compared. A new approach is then derived by combining the advantages of both algorithms. Determine the best close for your audience and your presentation. Close with a summary; offer options; recommend a strategy; suggest a plan; set a goal. Keep your focus throughout your presentation, and you will more likely achieve your purpose. November 23, 2018

51 Thanks! Any Questions ? November 23, 2018
Determine the best close for your audience and your presentation. Close with a summary; offer options; recommend a strategy; suggest a plan; set a goal. Keep your focus throughout your presentation, and you will more likely achieve your purpose. November 23, 2018

52 Acknowledgements Thanks to Dr. Wang for the chance to make the presentation Thanks to all people for listening my presentation Determine the best close for your audience and your presentation. Close with a summary; offer options; recommend a strategy; suggest a plan; set a goal. Keep your focus throughout your presentation, and you will more likely achieve your purpose. November 23, 2018


Download ppt "Department of Computer Science & Engineering"

Similar presentations


Ads by Google