Department of Computer Science & Engineering

Slides:



Advertisements
Similar presentations
CSE 522 Real-Time Scheduling (4)
Advertisements

A S CHEDULABILITY A NALYSIS FOR W EAKLY H ARD R EAL - T IME T ASKS IN P ARTITIONING S CHEDULING ON M ULTIPROCESSOR S YSTEMS Energy Reduction in Weakly.
Scheduling policies for real- time embedded systems.
Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments Ilhyun Lee Cherry K. Owen Haesun K. Lee The University of Texas.
5 May CmpE 516 Fault Tolerant Scheduling in Multiprocessor Systems Betül Demiröz.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
Embedded System Scheduling
Restoration and Regulation Discussion
REAL-TIME OPERATING SYSTEMS
Properties of Living things
With Remote Capabilities by Justin Dansby
Restoration and Regulation Discussion
All State Agencies Recycle (All StAR) Recycling Coordinator Training
AND TELECOMMUNICATIONS BUSINESS
Restoration and Regulation Discussion
Copyright © Dale Carnegie & Associates, Inc.
Properties of Living things
Rutherford County Schools
EHPV® Technology Sponsored by HUSCO Intl. & the FPMC Center
Fed Funds Rate Chris Lamoureux 9/23/2018
US Treasury & Its Borrowing
Hashing and Hash Tables
The Use of Artificial Life and Culture in Gaming As a Tool for Education Jared Witzer Frequently, presenters must deliver material of a technical nature.
Rutherford County Schools
Binhai Zhu Computer Science Department, Montana State University
An ANN Approach to EEG Scoring
Heaps,heapsort and priority queue
Binhai Zhu Computer Science Department, Montana State University
Teaching & Learning Staff and Work Plan
Brief Review of Proof Techniques
AOE/ESM 4084 Engineering Design Optimization
Technology Update Kris Young Director of Technology
Technology Update Kris Young Director of Technology
Erlang in Banking & Financial Switching
Copyright © Dale Carnegie & Associates, Inc.
Professional Learning Update & Scorecard
Presenting a Technical Report
Numerical Methods Charudatt Kadolkar 12/9/2018
Binhai Zhu Computer Science Department, Montana State University
Summer Success Academy Program Analysis Spring 2016
Board of Education Budget Workshop March 23, 2017
Limited-Preemption Scheduling of Sporadic Tasks Systems
Final Budget Amendment and Proposed Budget
Engineering Services & Software introduces SuperFractionate/Ponchon
Properties of Living things
Troy School District AP and Dual Enrollment Report
2015/16 Evaluation Summary October 4, 2016 Jordan Harris
2016 State Assessment Results
Business Services Update Board of Education Workshop December 1, 2015
Early Childhood Updates October 4, 2016
CIET,LAM,DEPARTMENT OF MECHANICAL ENGINEERING
TROY SCHOOL DISTRICT ENROLLMENT PROJECTIONS February 7, 2017
All State Agencies Recycle (All StAR) Recycling Coordinator Training
Wireless Technology Extending the Library Network to M-Commerce
2015/16 Evaluation Summary October 18, 2016 Jordan Harris
Properties of Living things
PSoup: A System for streaming queries over streaming data
Business Services Update Board of Education Workshop December 6, 2016
Presentation to the Portfolio Committee
Randomized Algorithm & Public Key Cryptography
Final Budget Amendment and Proposed Budget
Restoration and Regulation Discussion
Binhai Zhu Computer Science Department, Montana State University
Restoration and Regulation Discussion
Restoration and Regulation Discussion
Business Services Update Board of Education Workshop March 7, 2017
SAT Based Abstraction/Refinement in Model-Checking
Binhai Zhu Computer Science Department, Montana State University
Binhai Zhu Computer Science Department, Montana State University
Presentation transcript:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Check The Constraint After we compute the U-pattern of each job of a task, we got some pattern like this “ 0011001100110011 …” 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

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

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

(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

(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

(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

(m, k ) Scheduling Mandatory jobs are evenly distributed some characteristics of this kind of partition: Mandatory jobs are evenly distributed e.g. “ 1010101010 … “ 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. “ 110110110110 …” for constraint of (2,3) November 23, 2018

(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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

One example Consider a task ti with (m,k) constraint of (3,5),supoose the µ-pattern we compute for it is “11001110111101111001”, 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

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

Experiment Result November 23, 2018

Comparison of Schedulability November 23, 2018

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

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

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