Enforcing Real-Time Behavior I

Slides:



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

Copyright © 2000, Daniel W. Lewis. All Rights Reserved. CHAPTER 8 SCHEDULING.
Sogang University Advanced Operating Systems (Process Scheduling - Linux) Advanced Operating Systems (Process Scheduling - Linux) Sang Gue Oh, Ph.D. .
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.
CPU SCHEDULING RONG ZHENG. OVERVIEW Why scheduling? Non-preemptive vs Preemptive policies FCFS, SJF, Round robin, multilevel queues with feedback, guaranteed.
Project 2 – solution code
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 5 Operating Systems.
Operating System Concepts and Techniques Lecture 5 Scheduling-1 M. Naghibzadeh Reference M. Naghibzadeh, Operating System Concepts and Techniques, First.
More Scheduling cs550 Operating Systems David Monismith.
MM Process Management Karrie Karahalios Spring 2007 (based off slides created by Brian Bailey)
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
CHAPTER 2 PROCESSOR SCHEDULING PART V by U ğ ur HALICI.
RTOS task scheduling models
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems RMS and EDF Schedulers.
CS333 Intro to Operating Systems Jonathan Walpole.
Scheduling Classes and Real-Time Scheduling in Linux David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St.
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 32 – Multimedia OS Klara Nahrstedt Spring 2010.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 6: CPU Scheduling.
Embedded System Scheduling
REAL-TIME OPERATING SYSTEMS
OPERATING SYSTEMS CS 3502 Fall 2017
Chapter 19: Real-Time Systems
Scheduling of Non-Real-Time Tasks in Linux (SCHED_NORMAL/SCHED_OTHER)
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Midterm Review Chris Gill CSE 422S - Operating Systems Organization
Time Sources and Timing
Midterm Review David Ferry, Chris Gill
Networks and Operating Systems: Exercise Session 2
EEE 6494 Embedded Systems Design
Overview of the Lab 2 Assignment: Linux Scheduler Profiling
Chapter 2 Scheduling.
Chapter 8 – Processor Scheduling
Chapter 2.2 : Process Scheduling
Lecture 24: Process Scheduling Examples and for Real-time Systems
CprE 458/558: Real-Time Systems
Chapter 6: CPU Scheduling
CS 3204 Operating Systems Lecture 14 Godmar Back.
Chapter 6: CPU Scheduling
Real Time Scheduling Mrs. K.M. Sanghavi.
Chapter5: CPU Scheduling
COT 4600 Operating Systems Spring 2011
CPU SCHEDULING.
Outline Scheduling algorithms Multi-processor scheduling
CS-3013 Operating Systems Hugh C. Lauer
CPU scheduling decisions may take place when a process:
Multiprocessor and Real-Time Scheduling
CGS 3763 Operating Systems Concepts Spring 2013
Process Scheduling Decide which process should run and for how long
Chapter 19: Real-Time Systems
Overview of the Lab 2 Assignment: Multicore Real-Time Tasks
Processes and operating systems
CS703 – Advanced Operating Systems
Scheduling of Regular Tasks in Linux
Chapter 10 Multiprocessor and Real-Time Scheduling
Time Sources and Timing
Scheduling.
Scheduling Classes and Real-Time Scheduling in Linux
Shortest-Job-First (SJR) Scheduling
Linux Process State Scheduling information Identifiers
Real-Time Process Scheduling Concepts, Design and Implementations
Scheduling 21 May 2019.
Ch 4. Periodic Task Scheduling
Real-Time Process Scheduling Concepts, Design and Implementations
Linux Scheduling CSE 2431: Introduction to Operating Systems
Scheduling of Regular Tasks in Linux
Real-Time Scheduling David Ferry CSCI 3500 – Operating Systems
CPU Scheduling David Ferry CSCI 3500 – Operating Systems
Presentation transcript:

Enforcing Real-Time Behavior I Chris Gill, James Orr, and Son Dinh CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO 63130

Uniprocessor Real-Time Systems Each task τi is modeled as cyclic process, with period Ti, deadline Di, and computation time Ci Ex: Task τ1 T1=D1=5, C1=4 Goal: meet all tasks’ deadlines Time τ1 5 10 15 C. Liu, and J. Layland, “Scheduling Algorithms for Multiprogramming in a Hard Real-Time Environment,” Journal of the ACM 20(1), January 1973. CSE 522S – Advanced Operating Systems

Uniprocessor Real-Time Systems Task τi utilization Ui=Ci/Ti is % of processor to schedule a task Can schedule task sets with total utilization up to 1.0 (e.g., earliest-deadline first, or with rate monotonic if harmonic) Taskset 1 Taskset 2 Task Ci Ti=Di Ui τ1 2 10 0.20 τ2 6 20 0.30 τ3 7 14 0.50 Task Ci Ti=Di Ui τ1 3 12 0.25 τ2 7 20 0.35 τ3 40 0.50 1.00 1.10 C. Liu, and J. Layland, “Scheduling Algorithms for Multiprogramming in a Hard Real-Time Environment,” Journal of the ACM 20(1), January 1973. CSE 522S – Advanced Operating Systems

Real-Time Terminology Release time is when a job of a task is ready Start time is when a job is first scheduled Response time is completion minus release Sometimes also called “response latency” Execution time is sum of scheduled intervals Jitter is the variation in any one of those Higher priority job may preempt running one Τ1,1 Τ2,1 Τ1,1 Time released resumed preempted completed CSE 522S – Advanced Operating Systems

CSE 522S – Advanced Operating Systems Scheduling Classes Linux schedulers are implemented as different scheduling classes Normal: SCHED_IDLE: lowest priority scheduler SCHED_BATCH: low priority, non-interactive CFS tasks SCHED_NORMAL: regular, interactive CFS tasks Real-time: SCHED_RR: round-robin SCHED_FIFO: first-in, first-out SCHED_DEADLINE: earliest deadline first (rt-preempt) CSE 522S – Advanced Operating Systems

CSE 522S – Advanced Operating Systems SCHED_RR Round-robin scheduling Among tasks of equal priority: Rotate through all tasks Each task gets a fixed time slice Cannot run if higher priority tasks are runnable Task 1 Task 2 Task 3 Time CSE 522S – Advanced Operating Systems

CSE 522S – Advanced Operating Systems SCHED_FIFO First-in, First-out scheduling The first enqued task of highest priority executes to completion A task will only relinquish a processor when it completes, yields, or blocks Task 1 Task 2 Task 3 Time CSE 522S – Advanced Operating Systems

CSE 522S – Advanced Operating Systems SCHED_DEADLINE Earliest Deadline First (EDF) scheduling Whichever task has next deadline gets to run Theory exists to analyze such systems Linux implements bandwidth reservation to prevent deadline abuse Task 3 Deadline: 8 Exec time: 2 Task 2 Deadline: 12 Exec time: 3 Task 1 Deadline: 5 Exec time: 4 Time 0 Task 1 Task 2 Task 3 5 8 12 CSE 522S – Advanced Operating Systems

Periodic Real-Time Tasks on Linux Threads wake up, run task code, suspend Thread per priority level may work for FIFO Thread per task may be needed for RR, DEADLINE Timers expire, wake threads, reschedule Number of timers needed depends on granularity of differences in task release times A single timer can keep a “wheel” of release times Task 1 Task 2 Task 3 5 10 15 CSE 522S – Advanced Operating Systems