Real-Time systems By Dr. Amin Danial Asham.

Slides:



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

Real Time Scheduling.
Priority INHERITANCE PROTOCOLS
1 EE5900 Advanced Embedded System For Smart Infrastructure RMS and EDF Scheduling.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
CPE555A: Real-Time Embedded Systems
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems Resource Access Control Protocols.
Module 2 Priority Driven Scheduling of Periodic Task
Overview of Matchmaking and Scheduling (Mapping) Algorithm
Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Ceng Operating Systems Chapter 2.2 : Process Scheduling Process concept  Process scheduling Interprocess communication Deadlocks Threads.
Chapter 3: CPU Scheduling
Chapter 8 – Processor Scheduling Outline 8.1 Introduction 8.2Scheduling Levels 8.3Preemptive vs. Nonpreemptive Scheduling 8.4Priorities 8.5Scheduling Objectives.
Preemptive Behavior Analysis and Improvement of Priority Scheduling Algorithms Xiaoying Wang Northeastern University China.
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
Chapter 6: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 2, 2005 Chapter 6: CPU Scheduling Basic.
Cs238 CPU Scheduling Dr. Alan R. Davis. CPU Scheduling The objective of multiprogramming is to have some process running at all times, to maximize CPU.
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.
 Scheduling  Linux Scheduling  Linux Scheduling Policy  Classification Of Processes In Linux  Linux Scheduling Classes  Process States In Linux.
CPU-Scheduling Whenever the CPU becomes idle, the operating system must select one of the processes in the ready queue to be executed. The short term scheduler.
Chapter 6: CPU Scheduling
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
CHP-4 QUEUE.
MM Process Management Karrie Karahalios Spring 2007 (based off slides created by Brian Bailey)
Task Scheduling By Dr. Amin Danial Asham.
Lecture 2 Process Concepts, Performance Measures and Evaluation Techniques.
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.
Chapter 11 Heap. Overview ● The heap is a special type of binary tree. ● It may be used either as a priority queue or as a tool for sorting.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 31 – Multimedia OS (Part 1) Klara Nahrstedt Spring 2011.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
6. Application mapping 6.1 Problem definition
Cpr E 308 Spring 2005 Process Scheduling Basic Question: Which process goes next? Personal Computers –Few processes, interactive, low response time Batch.
ITFN 2601 Introduction to Operating Systems Lecture 4 Scheduling.
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.
Introduction to Embedded Systems Rabie A. Ramadan 5.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
Dynamic Priority Driven Scheduling of Periodic Task
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 31 – Process Management (Part 1) Klara Nahrstedt Spring 2009.
CHP-4 QUEUE Cont…. 7.DEQUE Deque (short form of double-ended queue) is a linear list in which elements can be inserted or deleted at either end but not.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 32 – Multimedia OS Klara Nahrstedt Spring 2010.
CPU Scheduling Operating Systems CS 550. Last Time Deadlock Detection and Recovery Methods to handle deadlock – Ignore it! – Detect and Recover – Avoidance.
Process Scheduling Schedulers and Scheduling Methods.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Lecture 12 Scheduling Models for Computer Networks Dr. Adil Yousif.
Real-Time Operating Systems RTOS For Embedded systems.
Embedded System Scheduling
Non-Preemptive Scheduling
Scheduling and Fairness
Chapter 5a: CPU Scheduling
Networks and Operating Systems: Exercise Session 2
Chapter 8 – Processor Scheduling
Lecture 24: Process Scheduling Examples and for Real-time Systems
Lottery Scheduling: Flexible Proportional-Share Resource Management
CPU Scheduling.
Chapter 6: CPU Scheduling
Process management Information maintained by OS for process management
Process Scheduling B.Ramamurthy 11/18/2018.
Chapter 6: CPU Scheduling
Limited-Preemption Scheduling of Sporadic Tasks Systems
COT 4600 Operating Systems Fall 2009
Process Scheduling B.Ramamurthy 2/23/2019.
Processes and operating systems
Chapter 10 Multiprocessor and Real-Time Scheduling
Uniprocessor scheduling
Chapter 6: Scheduling Algorithms Dr. Amjad Ali
Ch 4. Periodic Task Scheduling
Presentation transcript:

Real-Time systems By Dr. Amin Danial Asham

b. Earliest Deadline First (EDF) Scheduling In Earliest Deadline First (EDF) scheduling, at every scheduling point the task having the shortest deadline is taken up for scheduling. The basic principle of this algorithm is very simple to understand. The test of schedulability for EDF is also simple. A task set is schedulable under EDF, if and only if it satisfies the condition that the total processor utilization due to the task set is less than 1. For a set of periodic real-time tasks {T1, T2, ... , Tn}, EDF schedulability criterion can be expressed as: 𝑖=1 𝑛 𝑒 𝑖 𝑝 𝑖 = 𝑖=1 𝑛 𝑢 𝑖 ≤1 (𝑏1) Average utilization due to of the ith task Ti

b. Earliest Deadline First (EDF) Scheduling EDF has been proven to be an optimal uniprocessor scheduling algorithm. This means that if a set of tasks is un-schedulable under EDF, then no other scheduling algorithm can feasibly schedule this task set. In the simple schedulability test 𝒊=𝟏 𝒏 𝒆 𝒊 𝒑 𝒊 =≤𝟏 for EDF , we assumed that the period of each task is the same as its deadline.

b. Earliest Deadline First (EDF) Scheduling (continue) In practical problems the period of a task may at times be different from its deadline. If pi > di , then each task needs ei amount of computing time every min(pi,di) duration of time. Therefore, we can rewrite schedulability criterion as : 𝑖=1 𝑛 𝑒 𝑖 𝑚𝑖𝑛(𝑝 𝑖 , 𝑑 𝑖 ) =≤1 (𝑏2) However, if pi<di , it is possible that a set of tasks is EDF schedulable, even when the task set fails to meet the Expression (b2). Therefore, Expression (b2) in case of pi<di is not a necessary condition, but only a sufficient condition for a given task set to be EDF schedulable.

b. Earliest Deadline First (EDF) Scheduling (continue) Example 2.6: Consider the following three periodic real- time tasks to be scheduled using EDF on a uniprocessor: T1 = (el=10,Pl=20), T2 = (e2=5,P2=50), T3 = (e3=10,P3=35). Determine whether the task set is EDF schedulable. Solution: 𝑖=1 𝑛 𝑒 𝑖 𝑝 𝑖 = 10 20 + 5 50 + 10 35 =0.89

b. Earliest Deadline First (EDF) Scheduling (cont.) Why is EDF considered a Dynamic Priority Scheduling Algorithm? If EDF were to be considered a dynamic priority algorithm, we should be able determine the precise priority value of a task at any point of time and also be able to show how it changes with time. In fact, EDF has no notion of a priority value for a task. Tasks are scheduled solely based on the proximity of their deadline. However, the longer a task waits in a ready queue, the higher is the chance (probability) of being taken up for scheduling. A virtual priority value associated with a task keeps increasing with time until the task is taken up for scheduling. Note: it is important to understand that in EDF the tasks neither have any priority value associated with them, nor does the scheduler perform any priority computations to determine the schedulability of a task at either run time or compile time.

b. Earliest Deadline First (EDF) Scheduling (cont.) Implementation of EDF: A naive implementation of EDF would be to maintain all tasks that are ready for execution in a queue. Any freshly arriving task would be inserted at the end of the queue. Every node in the queue would contain the absolute deadline of the task. At every preemption point, the entire queue would be scanned from the beginning to determine the task having the shortest deadline. Note: This implementation is inefficient since it consumes time during scanning the queue proportional to the number tasks.

b. Earliest Deadline First (EDF) Scheduling (cont.) Implementation of EDF: (continue) A more efficient implementation of EDF would be as follows: The tasks are always kept sorted according to the proximity of their deadline. At every scheduling point, the next task to be run can be found at the top of the queue. When a task is taken up for scheduling, it needs to be removed from the priority queue.

b. Earliest Deadline First (EDF) Scheduling (cont.) Implementation of EDF: (continue) A still more efficient implementation of the EDF can be achieved as follows under the assumption that the number of distinct deadlines that tasks in an application can have are restricted: Whenever task arrives, its absolute deadline is computed from its release time and its relative deadline A separate FIFO queue is maintained for each distinct relative deadline that tasks can have. The scheduler inserts a newly arrived task at the end of the corresponding relative deadline queue. Clearly, tasks in each queue are ordered according to their absolute deadlines. To find a task with the earliest absolute deadline, the scheduler only needs to search among the threads of all FIFO queues

Shortcomings of EDF Though EDF is a simple as well as an optimal algorithm, it has a few shortcomings which render it almost unusable in practical applications: Transient Overload Problem: Transient overload denotes the overload of a system for a very short time. Transient overload occurs when some task takes more time to complete than what was originally planned during the design time. A task may take longer to complete due to many reasons. For example, it might enter an infinite loop or encounter an unusual condition and enter a rarely used branch due to some abnormal input values. When EDF is used to schedule a set of periodic real- time tasks, a task overshooting its completion time can cause some other task(s) to miss their deadlines. It is usually very difficult to predict during program design which task might miss its deadline when a transient overload occurs in the system due to a low priority task overshooting its deadline.

Shortcomings of EDF (continue) Resource Sharing Problem: When EDF is used to schedule a set of real-time tasks, unacceptably high overheads might have to be incurred to support resource sharing among the tasks without making tasks to miss their respective deadlines.

Shortcomings of EDF (continue) Efficient Implementation Problem: The efficient implementation that we discussed in previous Sec. is often not practicable as it is difficult to restrict the number of tasks with distinct deadlines to a reasonable number. This may be unacceptable in some situations. The complexity of insertion of an element into a priority queue represents a high runtime overhead, since most real-time tasks are periodic with small periods and strict deadlines.

Thanks