Dynamic Priority Driven Scheduling of Periodic Task

Slides:



Advertisements
Similar presentations
Washington WASHINGTON UNIVERSITY IN ST LOUIS Real-Time: Periodic Tasks Fred Kuhns Applied Research Laboratory Computer Science Washington University.
Advertisements

Time Demand Analysis.
1 EE5900 Advanced Embedded System For Smart Infrastructure RMS and EDF Scheduling.
CS5270 Lecture 31 Uppaal, and Scheduling, and Resource Access Protocols CS 5270 Lecture 3.
CPE555A: Real-Time Embedded Systems
Real Time Scheduling Terminologies define Fixed Priority Scheduler
Mehdi Kargahi School of ECE University of Tehran
Real-Time Systems Scheduling Tool Developed by Daniel Ghiringhelli Advisor: Professor Jiacun Wang December 19, 2005.
RUN: Optimal Multiprocessor Real-Time Scheduling via Reduction to Uniprocessor Paul Regnier † George Lima † Ernesto Massa † Greg Levin ‡ Scott Brandt ‡
Real-Time Scheduling CIS700 Insup Lee October 3, 2005 CIS 700.
Task Allocation and Scheduling n Problem: How to assign tasks to processors and to schedule them in such a way that deadlines are met n Our initial focus:
Module 2 Priority Driven Scheduling of Periodic Task
Chapter 6 Dynamic Priority Servers
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
Periodic Task Scheduling
EE 249, Fall Discussion: Scheduling Haibo Zeng Amit Mahajan.
Embedded Systems Exercise 3: Scheduling Real-Time Periodic and Mixed Task Sets 18. May 2005 Alexander Maxiaguine.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
Technische Universität Dortmund Classical scheduling algorithms for periodic systems Peter Marwedel TU Dortmund, Informatik 12 Germany 2007/12/14.
The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt.
Module 2 Clock-Driven Scheduling
MM Process Management Karrie Karahalios Spring 2007 (based off slides created by Brian Bailey)
Real Time Operating Systems Scheduling & Schedulers Course originally developed by Maj Ron Smith 8-Oct-15 Dr. Alain Beaulieu Scheduling & Schedulers- 7.
Scheduling policies for real- time embedded systems.
Multiprocessor Real-time Scheduling Jing Ma 马靖. Classification Partitioned Scheduling In the partitioned approach, the tasks are statically partitioned.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Real-Time Scheduling CS 3204 – Operating Systems Lecture 20 3/3/2006 Shahrooz Feizabadi.
6. Application mapping 6.1 Problem definition
Real Time Systems Real-Time Schedulability Part I.
RTOS task scheduling models
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems RMS and EDF Schedulers.
KUKUM Real Time System 1/21 Module 2 Real Time System Scheduling Lecture 05.
CSE 522 Real-Time Scheduling (2)
Module 2 Overview of Real Time System Scheduling
Real-Time systems By Dr. Amin Danial Asham.
Real-Time Scheduling CS 3204 – Operating Systems Lecture 13 10/3/2006 Shahrooz Feizabadi.
1 Real-Time Scheduling. 2Today Operating System task scheduling –Traditional (non-real-time) scheduling –Real-time scheduling.
CSCI1600: Embedded and Real Time Software Lecture 24: Real Time Scheduling II Steven Reiss, Fall 2015.
Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng.
Common Approaches to Real-Time Scheduling Clock-driven (time-driven) schedulers Priority-driven schedulers Examples of priority driven schedulers Effective.
Introduction to Embedded Systems Rabie A. Ramadan 5.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
Classical scheduling algorithms for periodic systems Peter Marwedel TU Dortmund, Informatik 12 Germany 2012 年 12 月 19 日 These slides use Microsoft clip.
Introduction to Real-Time Systems
For a good summary, visit:
2/23/2016COSC , Lecture 21 Real-Time Systems, COSC , Lecture 2 Stefan Andrei.
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
Clock Driven Schedulers
Lecture 6: Real-Time Scheduling
Real-Time Operating Systems RTOS For Embedded systems.
Embedded System Scheduling
Scheduling and Resource Access Protocols: Basic Aspects
EEE 6494 Embedded Systems Design
Clock Driven Scheduling
Lecture 24: Process Scheduling Examples and for Real-time Systems
Chapter 6: CPU Scheduling
Chapter 6 Dynamic Priority Servers
Clock-driven Static scheduling
Real Time Scheduling Mrs. K.M. Sanghavi.
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
Limited-Preemption Scheduling of Sporadic Tasks Systems
CSCI1600: Embedded and Real Time Software
NET 424: REAL-TIME SYSTEMS (Practical Part)
Processes and operating systems
Chapter 10 Multiprocessor and Real-Time Scheduling
Ch.7 Scheduling Aperiodic and Sporadic Jobs in Priority-Driven Systems
Chapter 6: CPU Scheduling
Ch 4. Periodic Task Scheduling
Presentation transcript:

Dynamic Priority Driven Scheduling of Periodic Task Real Time System

Lecture Outline Assumptions Fixed-priority algorithms Rate monotonic Deadline monotonic Dynamic-priority algorithms Earliest deadline first Least slack time Relative merits of fixed- and dynamic-priority scheduling Schedulable utilization and proof of schedulability The material in this lecture corresponds to chapter 6 of Liu’s book Done in the previous week Real Time System

Assumptions Focus on well-known priority-driven algorithms for scheduling periodic tasks on a single processor Assume a restricted periodic task model: A fixed number of independent periodic tasks exist Jobs comprising those tasks: Are ready for execution as soon as they are released Can be pre-empted at any time Never suspend themselves New tasks only admitted after an acceptance test; may be rejected The period of a task defined as minimum inter-release time of jobs in task There are no aperiodic or sporadic tasks Scheduling decisions made immediately upon job release and completion Algorithms are event driven, never intentionally leave a resource idle Context switch overhead negligibly small; unlimited priority levels Real Time System

Dynamic Vs Static Systems Before we go deeper into dynamic scheduling…lets talk abt dynamic system Recall from previous lecture: If jobs are scheduled on multiple processors, and a job can be dispatched to any of the processors, the system is dynamic If jobs are partitioned into subsystems, each subsystem bound statically to a processor, we have a static system Difficult to determine the best- and worst-case performance of dynamic systems, so most hard real-time systems built are static In static systems, the scheduler for each processor schedules the jobs in its subsystem independent of the schedulers for the other processors Results demonstrated for priority-driven uniprocessor systems are applicable to each subsystem of a static multiprocessor system They are not applicable to dynamic multiprocessor systems Real Time System

Fixed- and Dynamic-Priority Algorithms A priority-driven scheduler is an on-line scheduler It does not pre-compute a schedule of tasks/jobs: instead assigns priorities to jobs when released, places them on a run queue in priority order When pre-emption is allowed, a scheduling decision is made whenever a job is released or completed At each scheduling decision time, the scheduler updates the run queues and executes the job at the head of the queue Jobs in a task may be assigned the same priority (task level fixed priority….like RM) or different priorities (task level dynamic- priority…like…..???? Will get there) The priority of each job is usually fixed (job level fixed-priority); but some systems can vary the priority of a job after it has started (job level dynamic-priority) Job level dynamic-priority usually very inefficient Real Time System

Dynamic-Priority Algorithms Earliest deadline first (EDF) The job queue is ordered by earliest deadline Least slack time first (LST) The job queue is ordered by least slack time Two variations: Strict LST – scheduling decisions are made also whenever a queued job’s slack time becomes smaller than the executing job’s slack time – huge overheads, not used Non-strict LST – scheduling decisions made only when jobs release or complete First in, first out (FIFO) Job queue is first-in-first-out by release time Last in, first out (LIFO) Job queue is last-in-first-out by release time Real Time System

Relative Merits Fixed- and dynamic-priority scheduling algorithms have different properties; neither appropriate for all scenarios Algorithms that do not take into account the urgencies of jobs in priority assignment usually perform poorly e.g FIFO, LIFO The EDF algorithm gives higher priority to jobs that have missed their deadlines than to jobs whose deadline is still in the future Not necessarily suited to systems where occasional overload unavoidable Dynamic algorithms like EDF can produce feasible schedules in cases where RM and DM cannot But fixed priority algorithms often more predictable ( refer text : pg 122- 123 : Figure6-5 ) Real Time System

Example: Comparing Different Algorithms Compare the performance of RM, EDF, LST and FIFO scheduling Assume a single processor system with 2 tasks: T1 = (2, 1) T2 = (5, 2.5) H = 10 The total utilization is 1.0 => no slack time Expect some of these algorithms to lead to missed deadlines! This is one of the cases where EDF works better than RM/DM Real Time System

Ex: RM, EDF, LST and FIFO Real Time System

Schedulability Tests Remember…. from previous lecture…… Simulating schedules is both tedious and error- prone… can we demonstrate correctness without working through the schedule? Yes, in some cases! This is a schedulability test A test to demonstrate that all deadlines are met, when scheduled using a particular algorithm An efficient schedulability test can be used as an on- line acceptance test;clearly exhaustive simulation is too expensive for this! Real Time System

Scheduable Utilization Real Time System

Real Time System

Schedulable Utilization: EDF Real Time System

Schedulable Utilization: EDF Real Time System

Exercise your brain muscle Assume that you have a system of periodic, independent, preemptible tasks to be scheduled on a single processor, T = {Ti} for i = 1..n, where Ti = (φi, pi, ei, and Di) for each i. Real Time System

(a) Assume pi = Di for each i (a) Assume pi = Di for each i. What is the schedulability condition of the Earliest Deadline First algorithm for this system? Is this a necessary and sufficient condition? (b) Assume that pi ≥ Di for each i. What is the schedulability condition of the Earliest Deadline First algorithm for this system? Is this a necessary and sufficient condition? Real Time System

Answer (a) Assume pi = Di for each i. What is the schedulability condition of the Earliest Deadline First algorithm for this system? Is this a necessary and sufficient condition? If the inequality is satisfied, then the system is schedulable using EDF. This is a necessary and sufficient condition. Real Time System

Answer Assume that pi ≥ Di for each i. What is the schedulability condition of the Earliest Deadline First algorithm for this system? Is this a necessary and sufficient condition? If the inequality is satisfied, then the system is schedulable using EDF. This is a sufficient condition unless pi = Di for all i, in which case it is also necessary. Real Time System

Schedulable Utilization of RM Real Time System

Schedulable Utilization of RM Real Time System

Schedulable Utilization of RM Real Time System

Summary Key points: Different priority scheduling algorithms Earliest deadline first, least slack time, rate monotonic, deadline monotonic Each has different properties, suited for different scenarios Scheduling tests, concept of maximum schedulable utilization Examples for different algorithms Tomorrow: practical factors, more schedulability tests…(depends, maybe..for sure next week) Real Time System

Exercise your brain muscle Assume that you have a system of periodic, independent, pre-emptible tasks to be scheduled on a single processor, T = {Ti} for i = 1..n, where Ti = (φi, pi, ei, and Di) for each i. Real Time System

(c) Assume that pi = Di for each i (c) Assume that pi = Di for each i. What is the schedulability condition of the Rate Monotonic algorithm for this system? Is this a necessary and sufficient condition? (d) Assume that pi ≤ Di for each i. Under what conditions will the schedulability of the Rate Monotonic algorithm for this system be identical to that stated in response to part (a) above? Real Time System

Answer Assume that pi = Di for each i. What is the schedulability condition of the Rate Monotonic algorithm for this system? Is this a necessary and sufficient condition? If the inequality is satisfied, then the system is schedulable using RM. This is a sufficient condition; there may be systems which do not satisfy this inequality that still yield feasible schedules. Real Time System

Answer Assume that pi ≤ Di for each i. Under what conditions will the schedulability of the Rate Monotonic algorithm for this system be identical to that stated in response to part (c) above? If the system is simply periodic – i.e. if for every pair of tasks Ti and Tk in T such that pi < pk, pk is an integer multiple of pi. This is a necessary and sufficient condition. (read page 153: Scheduleable utilization of Subsets of Simply periodic task.) Real Time System