Courseware Basics of Real-Time Scheduling Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building.

Slides:



Advertisements
Similar presentations
EE5900 Advanced Embedded System For Smart Infrastructure
Advertisements

Threads, SMP, and Microkernels
© 2004 Wayne Wolf Topics Task-level partitioning. Hardware/software partitioning.  Bus-based systems.
Courseware Scheduling of Distributed Real-Time Systems Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens.
WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard.
Courseware Abstract RTOS Modelling for Multi-Processor SoC using SystemC Prof. Jan Madsen Informatics and Mathematical Modelling Technical University of.
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.
Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Processes and Their Scheduling.
Architecture Modeling and Analysis for Embedded Systems Oleg Sokolsky CIS700 Fall 2005.
Courseware Power-aware scheduling Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building 321.
Courseware Scheduling Uniprocessor Real-Time Systems Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens.
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.
Courseware High-Level Synthesis an introduction Prof. Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
1 of 14 1 Analysis and Synthesis of Communication-Intensive Heterogeneous Real-Time Systems Paul Pop Computer and Information Science Dept. Linköpings.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
Misconceptions About Real-time Computing : A Serious Problem for Next-generation Systems J. A. Stankovic, Misconceptions about Real-Time Computing: A Serious.
Technische Universität Dortmund Classical scheduling algorithms for periodic systems Peter Marwedel TU Dortmund, Informatik 12 Germany 2007/12/14.
Distributed Real-Time systems 1 By: Mahdi Sadeghizadeh Website: Sadeghizadeh.ir Advanced Computer Networks.
Real Time Operating Systems Scheduling & Schedulers Course originally developed by Maj Ron Smith 8-Oct-15 Dr. Alain Beaulieu Scheduling & Schedulers- 7.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
Scheduling policies for real- time embedded systems.
Real-Time Operating Systems for Embedded Computing 李姿宜 R ,06,10.
Multiprocessor and Real-Time Scheduling Chapter 10.
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
1 Multiprocessor and Real-Time Scheduling Chapter 10 Real-Time scheduling will be covered in SYSC3303.
Real-Time Systems Mark Stanovich. Introduction System with timing constraints (e.g., deadlines) What makes a real-time system different? – Meeting timing.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
Prepare by : Ihab shahtout.  Overview  To give an overview of fixed priority schedule  Scheduling and Fixed Priority Scheduling.
I/O Computer Organization II 1 Interconnecting Components Need interconnections between – CPU, memory, I/O controllers Bus: shared communication channel.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
1 11/29/2015 Chapter 6: CPU Scheduling l Basic Concepts l Scheduling Criteria l Scheduling Algorithms l Multiple-Processor Scheduling l Real-Time Scheduling.
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems RMS and EDF Schedulers.
Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 5 CPU Scheduling Slide 1 Chapter 5 CPU Scheduling.
Lecture 2, CS52701 The Real Time Computing Environment I CS 5270 Lecture 2.
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:
Slides created by: Professor Ian G. Harris Operating Systems  Allow the processor to perform several tasks at virtually the same time Ex. Web Controlled.
CS4315A. Berrached:CMS:UHD1 Introduction to Operating Systems Chapter 1.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Basic Concepts Maximum CPU utilization obtained with multiprogramming
Distributed Process Scheduling- Real Time Scheduling Csc8320(Fall 2013)
Real-Time Operating Systems RTOS For Embedded systems.
 Operating system.  Functions and components of OS.  Types of OS.  Process and a program.  Real time operating system (RTOS).
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Processes and Threads Processes and their scheduling
Unit OS9: Real-Time and Embedded Systems
Module 5: CPU Scheduling
CPU SCHEDULING.
Multiprocessor and Real-Time Scheduling
EE 472 – Embedded Systems Dr. Shwetak Patel.
Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Ref: Real-Time Systems & Software Alan Shaw Processes - Tasks.
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Presentation transcript:

courseware Basics of Real-Time Scheduling Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building 321 DK2800 Lyngby, Denmark

SoC-MOBINET coursewareJan Madsen2 WAP application Need structure and to perform multiple processes - send requests to server - translate data received from server - render data on display - operating the user’s control panel - logically different operations - performed at different rates Tasks: Why?

SoC-MOBINET coursewareJan Madsen3 Why use multiple processes? Processes are a neat way to handle complex systems Processes introduce structure into the system design –understand each process independently –analyze communication between processes to determine system behavior Timing is easier to specify Communication between processes provide test points Suitable for team effort

SoC-MOBINET coursewareJan Madsen4 What is a process?  A process is a state and a procedure  State:  Running  Suspended  Deactivated  Procedure:  Sequence of separate steps  A process may interact with its surroundings

SoC-MOBINET coursewareJan Madsen5 Process execution deadline activation period

SoC-MOBINET coursewareJan Madsen6 Process execution Periodic –the period is the time between successive executions –the process rate is the inverse of its period Aperiodic –non-periodic process, typical an event handler Sporadic –hard real-time aperiodic process –usually, a minimum interarrival constraint is imposed

SoC-MOBINET coursewareJan Madsen7 Example: A software processes  A process includes:  code  memory which belongs to the process  connections to other processes  A process is a unique execution of a program  In most embedded systems, processes never die!

SoC-MOBINET coursewareJan Madsen8 CPU Memory Executing on a single CPU P 1 code & data P 2 code & data P 3 code & data P 1 state P 2 state P 3 state PC registers

SoC-MOBINET coursewareJan Madsen9 Execution of multiple processes On a single CPU –A Pentium processor On a distributed homogeneous system –A network of Pentium processors On a distributed heterogeneous system –A network of differing processors (CPUs and ASICs)

SoC-MOBINET coursewareJan Madsen10 About this lecture  Huge literature on scheduling theory  Aim is to give an overview of problems and possible solutions to the multi-task scheduling problem related to RTOS  Structure of lecture:  Some basic concepts and teminology  Uni-processor scheduling  Rate-monotonic scheduling  Earlies-deadlines-first scheduling  Multi-processor scheduling

SoC-MOBINET coursewareJan Madsen11 PART I Scheduling Terminology and Basic Concepts

SoC-MOBINET coursewareJan Madsen12 Design flow P1P1 P2P2 P3P3 Partitioning/clustering Break processes to increase parallelism Cluster processes to reduce communication Allocation PE 1 PE 2 Mapping Scheduling Communication P1P1 P3P3 P2P2 PE 1 PE 2 P1P1 P 2 & P 3

SoC-MOBINET coursewareJan Madsen13 Scheduling abc 1 2 os 3 4 scheduling abc

SoC-MOBINET coursewareJan Madsen14 Terminology Application Architecture constraints Scheduler Schedule Architecture Application Scheduling Constraints

SoC-MOBINET coursewareJan Madsen15 Architecture  Components  Processors  CPU, DSP, ASIC,...  Communication  Bus, network,...  Devices  sensor, actuator, display,...  Architecture may be fixed or (re-)configurable mem device abc os

SoC-MOBINET coursewareJan Madsen16 Application  Task  A module which can be envoked to perform a particular function  A schedulable entity  Characterized by its:  Timing constraints  Precedence contraints  Exclusion constraints  Resource requirements

SoC-MOBINET coursewareJan Madsen17 Timing constraints r1r1 r 1 = time at which task becomes released (or active) e1e1 e 1 = worst case execution time (WCET) d 1 = deadline, task should complete before this! d1d1 s1s1 s 1 = time at which task starts its execution T1T1 T 1 = period, minimum time between task releases 1

SoC-MOBINET coursewareJan Madsen18 Task execution  Periodic  the period is the time between successive executions  Aperiodic  non-periodic task, typical an event handler  Sporadic  hard real-time aperiodic task  typical, a minimum interarrival constraint is imposed

SoC-MOBINET coursewareJan Madsen19 Precedence constraints  p i precede p j if p i must finish before p j begins  process interrelate with each other to achieve:  synchronization  exchange data pipi pjpj pipi pjpj blocked

SoC-MOBINET coursewareJan Madsen20 Exclusion constraints  p i exclude p j if no execution of p j is allowed between the time that p i starts its computation and the time that p i complete its computation  Prevent simultaneous access to shared resources  data  memory  devices pipi pjpj pipi pjpj p j blocked

SoC-MOBINET coursewareJan Madsen21 Resource constraints  R = r 1, r 2, …, r m  Example:  R(p i ) = {r 1, r 3 } resource r 1 and r 3 is required by p i during its execution  may be used to  implement a critical section  enforce PE assignment of processes

SoC-MOBINET coursewareJan Madsen22 Scheduling approaches  Classical scheduling theory  Uniprocessor systems  RMS  EDF  Distributed real-time scheduling  Deterministic (static) scheduling  Dynamic scheduling

SoC-MOBINET coursewareJan Madsen23 Scheduling  Allocation  Determine number and type of processors/resources  Assignment  Binding tasks to processors  Scheduling  Determine execution order a b b a Task view 1 2 Architecture view a b

SoC-MOBINET coursewareJan Madsen24 Scheduling principles  Off-line  A scheduler performing its job before the scheduled system is put into operation  On-line  A scheduler performing its job at run-time, when the system is running  Typically list-based  When a task is released (ready) it is placed in a list  Scheduler select which task from the list to execute next  Selection based on some criteria – scheduling policy

SoC-MOBINET coursewareJan Madsen25 Scheduling areas  High-level Synthesis:  fine grained, operation/instruction level  schedule done off-line  single time constraint  Real-time operating systems (RTOS):  coarse grained, programs/sub-programs  scheduling done on-line  multiple time constraints

SoC-MOBINET coursewareJan Madsen26 SoC scheduling  Similarity to RTOS  Time constraints  Context switching  Task synchronization  Task communication  Difference to RTOS  Large design space  Variable granularity  Wide range of metrics  Time, power, cost,...  Flexibility, reliability,...  High degree of optimization  Dedicated hardware

SoC-MOBINET coursewareJan Madsen27  Non-preemptive scheduling  Preemptive scheduling Preemption vs. Non-preemption

SoC-MOBINET coursewareJan Madsen28 Metrics  Minimize:  c i  w c i i }{ max de L ii i   lateness, tardiness Schedule length p1p1 p2p2 p3p3 p4p4 p5p5 p1p1 p2p2 p3p3 p4p4 p5p5 d1d1 d2d2 d3d3 d4d4 d5d5