By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.

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.
EE5900 Advanced Embedded System For Smart Infrastructure
1 EE5900 Advanced Embedded System For Smart Infrastructure RMS and EDF Scheduling.
CPE555A: Real-Time Embedded Systems
Courseware Scheduling of Distributed Real-Time Systems Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens.
Mehdi Kargahi School of ECE University of Tehran
Real-Time Scheduling CIS700 Insup Lee October 3, 2005 CIS 700.
Tasks Periodic The period is the amount of time between each iteration of a regularly repeated task Time driven The task is automatically activated by.
Module 2 Priority Driven Scheduling of Periodic Task
CPU SCHEDULING RONG ZHENG. OVERVIEW Why scheduling? Non-preemptive vs Preemptive policies FCFS, SJF, Round robin, multilevel queues with feedback, guaranteed.
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.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
CprE 458/558: Real-Time Systems
Spring 2002Real-Time Systems (Shin) Rate Monotonic Analysis Assumptions – A1. No nonpreemptible parts in a task, and negligible preemption cost –
Misconceptions About Real-time Computing : A Serious Problem for Next-generation Systems J. A. Stankovic, Misconceptions about Real-Time Computing: A Serious.
Real-Time Operating System Chapter – 8 Embedded System: An integrated approach.
Real-time Scheduling Review Venkita Subramonian Research Seminar on Software Systems February 2, 2004.
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
More Scheduling cs550 Operating Systems David Monismith.
Real Time Operating Systems Scheduling & Schedulers Course originally developed by Maj Ron Smith 8-Oct-15 Dr. Alain Beaulieu Scheduling & Schedulers- 7.
What Does Real-Time Mean? Main difference to other computation: time time means that correctness of system depends - not only on logical results - but.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Scheduling policies for real- time embedded systems.
Real Time Scheduling Telvis Calhoun CSc Outline Introduction Real-Time Scheduling Overview Tasks, Jobs and Schedules Rate/Deadline Monotonic Deferrable.
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.
2.5 Scheduling Given a multiprogramming system. Given a multiprogramming system. Many times when more than 1 process is waiting for the CPU (in the ready.
6. Application mapping 6.1 Problem definition
Undergraduate course on Real-time Systems Linköping 1 of 45 Autumn 2009 TDDC47: Real-time and Concurrent Programming Lecture 5: Real-time Scheduling (I)
RTOS task scheduling models
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems RMS and EDF Schedulers.
Special Class on Real-Time Systems
Module 2 Overview of Real Time System Scheduling
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.
2.5 Scheduling. Given a multiprogramming system, there are many times when more than 1 process is waiting for the CPU (in the ready queue). Given a multiprogramming.
Real time scheduling G.Anuradha Ref:- Stallings. Real time computing Correctness of the system depends not only on the logical result of computation,
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
Introduction to Real-Time Systems
CS333 Intro to Operating Systems Jonathan Walpole.
For a good summary, visit:
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.
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.
Basic Concepts Maximum CPU utilization obtained with multiprogramming
Lecture 6: Real-Time Scheduling
Real-Time Operating Systems RTOS For Embedded systems.
CPU Scheduling Scheduling processes (or kernel-level threads) onto the cpu is one of the most important OS functions. The cpu is an expensive resource.
Embedded System Scheduling
EEE 6494 Embedded Systems Design
Chapter 2 Scheduling.
Chapter 8 – Processor Scheduling
Lecture 24: Process Scheduling Examples and for Real-time Systems
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter5: CPU Scheduling
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
Processes and operating systems
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Real-Time Process Scheduling Concepts, Design and Implementations
Ch 4. Periodic Task Scheduling
Real-Time Process Scheduling Concepts, Design and Implementations
Presentation transcript:

By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh

Outline Real-Time System Task categories Why we need scheduling Real time scheduling taxonomies Scheduling Periodic Tasks Real-Time Scheduling Algorithms Static scheduling algorithms Dynamic scheduling algorithms Hybrid algorithm referances

Real-Time System Real-time systems have been defined as: “those systems in which the correctness of the system depends not only on the logical result of the computation, but also on the time at which the results are produced“ Correct function at correct time Usually embedded Deadlines Hard real-time systems Soft real-time systems

Real-Time System continue Soft RTS: meet timing constraints most of the time, it is not necessary that every time constraint be met. Some deadline miss is tolerated. Hard RTS: meet all time constraints exactly, Every resource management system must work in the correct order to meet time constraints. No deadline miss is allowed.

Tasks Categories Invocation Periodic (time-triggered) Aperiodic (event-triggered) Creation Static Dynamic Multi-Tasking System Preemptive: higher-priority process taking control of the processor from a lower-priority Non-Preemptive : Each task can control the CPU for as long as it needs it.

Why we need scheduling ?! each computation (task) we want to execute needs resources resources: processor, memory segments, communication, I/O devices etc.) the computation must be executed in particular order (relative to each other and/or relative to time) the possible ordering is either completely or statistically a priori known (described) scheduling: assignment of processor to computations; allocation: assignment of other resources to computations;

Job (J ij ): Unit of work, scheduled and executed by system. Jobs repeated at regular or semi-regular intervals modeled as periodic Task (T i ): Set of related jobs. Jobs scheduled and allocated resources based on a set of scheduling algorithms and access control protocols. Scheduler: Module implementing scheduling algorithms Schedule: assignment of all jobs to available processors, produced by scheduler. Valid schedule: All jobs meet their deadline Clock-driven scheduling vs Event(priority)-driven scheduling Fixed Priority vs Dynamic Priority assignment Real-time Scheduling Taxonomy

Scheduling Periodic Tasks In hard real-time systems, set of tasks are known apriori Task T i is a series of periodic Jobs J ij. Each task has the following parameters t i - period, minimum interrelease interval between jobs in Task T i. c i - maximum execution time for jobs in task T i. r ij - release time of the j th Job in Task i (J ij in T i ).  i - phase of Task T i, equal to r i1. u i - utilization of Task T i = c i / t i In addition the following parameters apply to a set of tasks H - Hyperperiod = Least Common Multiple of p i for all i: H = lcm(p i ), for all i. U - Total utilization = Sum over all u i. Schedulable utilization of an algorithm U s If U < U s the set of tasks can be guaranteed to be scheduled

Real-Time Scheduling Algorithms Fixed Priority Algorithms Dynamic Priority Algorithms Hybrid algorithms Rate Monotonic scheduling Deadline Monotonic scheduling Earliest Deadline First Least Laxity First Maximum Urgency First

Scheduling Algorithm Static vs. Dynamic Static Scheduling: All scheduling decisions at compile time. Temporal task structure fixed. Precedence and mutual exclusion satisfied by the schedule (implicit synchronization). One solution is sufficient. Any solution is a sufficient schedulability test. Benefits Simplicity

Scheduling Algorithm Static vs. Dynamic Dynamic Scheduling: All scheduling decisions at run time. Based upon set of ready tasks. Mutual exclusion and synchronization enforced by explicit synchronization constructs. Benefits Flexibility. Only actually used resources are claimed. Disadvantages Guarantees difficult to support Computational resources required for scheduling

Scheduling Algorithm Preemptive vs. Nonpreemptive Preemptive Scheduling: Event driven. Each event causes interruption of running tasks. Choice of running tasks reconsidered after each interruption. Benefits: Can minimize response time to events. Disadvantages: Requires considerable computational resources for scheduling

Nonpreemptive Scheduling: Tasks remain active till completion Scheduling decisions only made after task completion. Benefits: Reasonable when task execution times ~= task switching times. Less computational resources needed for scheduling Disadvantages: Can leads to starvation (not met the deadline) especially for those real time tasks ( or high priority tasks). Scheduling Algorithm Preemptive vs. Nonpreemptive

Rate Monotonic scheduling Priority assignment based on rates of tasks Higher rate task assigned higher priority Schedulable utilization = (Liu and Leyland) Where C i is the computation time, and T i is the release period If U < 0.693, schedulability is guaranteed Tasks may be schedulable even if U > 0.693

RM example Period Execution Time Process 81P1 52P2 102P3 The utilization will be: The theoretical limit for processes, under which we can conclude that the system is schedulable is: Since the system is schedulable!

Deadline Monotonic scheduling Priority assignment based on relative deadlines of tasks Shorter the relative deadline, higher the priority

Earliest Deadline First (EDF) Dynamic Priority Scheduling Priorities are assigned according to deadlines: Earlier deadline, higher priority Later deadline, lower priority The first and the most effectively widely used dynamic priority-driven scheduling algorithm. Effective for both preemptive and non-preemptive scheduling.

Two Periodic Tasks Execution profile of two periodic tasks Process A Arrives02040… Execution Time101010… End by204060… Process B Arrives050100… Execution Time252525… End by … Question: Is there enough time for the execution of two periodic tasks?

Five Periodic Tasks Execution profile of five periodic tasks ProcessArrival Time Execution Time Starting Deadline A B20 C D 2090 E602070

Least Laxity First (LLF) Dynamic preemptive scheduling with dynamic priorities Laxity : The difference between the time until a tasks completion deadline and its remaining processing time requirement. a laxity is assigned to each task in the system and minimum laxity tasks are executed first. Larger overhead than EDF due to higher number of context switches caused by laxity changes at run time Less studies than EDF due to this reason

Least Laxity First Cont LLF considers the execution time of a task, which EDF does not. LLF assigns higher priority to a task with the least laxity. A task with zero laxity must be scheduled right away and executed without preemption or it will fail to meet its deadline. The negative laxity indicates that the task will miss the deadline, no matter when it is picked up for execution.

Least Laxity First Example

Maximum Urgency First Algorithm This algorithm is a combination of fixed and dynamic priority scheduling, also called mixed priority scheduling. With this algorithm, each task is given an urgency which is defined as a combination of two fixed priorities (criticality and user priority) and a dynamic priority that is inversely proportional to the laxity. The MUF algorithm assigns priorities in two phases Phase One concerns the assignment of static priorities to tasks Phase Two deals with the run-time behavior of the MUF scheduler

The first phase consists of these steps : 1) It sorts the tasks from the shortest period to the longest period. Then it defines the critical set as the first N tasks such that the total CPU load factor does not exceed 100%. These tasks are guaranteed not to fail even during a transient overload. 2) All tasks in the critical set are assigned high criticality. The remaining tasks are considered to have low criticality. 3) Every task in the system is assigned an optional unique user priority Maximum Urgency First Algorithm phase 1

In the second phase, the MUF scheduler follows an algorithm to select a task for execution. This algorithm is executed whenever a new task is arrived to the ready queue. The algorithm is as follows: 1) If there is only one highly critical task, pick it up and execute it. 2) If there are more than one highly critical task, select the one with the highest dynamic priority. Here, the task with the least laxity is considered to be the one with the highest priority. 3) If there is more than one task with the same laxity, select the one with the highest user priority. Maximum Urgency First Algorithm phase 2

Questions ??

Referances monotonic_scheduling monotonic_scheduling php php