Page 110/9/2015 CSE 40373/60373: Multimedia Systems So far…  RMS - task with highest rate has highest priority  EDF – earliest deadline first  Tasks.

Slides:



Advertisements
Similar presentations
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
Advertisements

CPU SCHEDULING RONG ZHENG. OVERVIEW Why scheduling? Non-preemptive vs Preemptive policies FCFS, SJF, Round robin, multilevel queues with feedback, guaranteed.
Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Scheduling in Batch Systems
Project 2 – solution code
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
OS Spring ’ 04 Scheduling Operating Systems Spring 2004.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Chapter 5: CPU Scheduling
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
CPU Scheduling Introduction to Operating Systems: Module 13.
MM Process Management Karrie Karahalios Spring 2007 (based off slides created by Brian Bailey)
Fair Resource Access & Allocation  OS Scheduling
Page 19/18/2015 CSE 40373/60373: Multimedia Systems Resources Classification  Resource is a system entity required by tasks for manipulating data  Active.
Operating System Examples - Scheduling
Chapter 6 Scheduling. Basic concepts Goal is maximum utilization –what does this mean? –cpu pegged at 100% ?? Most programs are I/O bound Thus some other.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Scheduling. Alternating Sequence of CPU And I/O Bursts.
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.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
1 Our focus  scheduling a single CPU among all the processes in the system  Key Criteria: Maximize CPU utilization Maximize throughput Minimize waiting.
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.
CompSci 143A1 5. Process and thread scheduling 5.1 Organization of Schedulers – Embedded and Autonomous Schedulers – Priority Scheduling 5.2 Scheduling.
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.
RTOS task scheduling models
Cpr E 308 Spring 2005 Process Scheduling Basic Question: Which process goes next? Personal Computers –Few processes, interactive, low response time Batch.
1 Real-Time Scheduling. 2Today Operating System task scheduling –Traditional (non-real-time) scheduling –Real-time scheduling.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 31 – Process Management (Part 1) Klara Nahrstedt Spring 2009.
CS333 Intro to Operating Systems Jonathan Walpole.
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.
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
Real-Time Operating Systems RTOS For Embedded systems.
Chapter 6: CPU Scheduling (Cont’d)
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Chapter 5a: CPU Scheduling
Processes and Threads Processes and their scheduling
Uniprocessor Scheduling
Networks and Operating Systems: Exercise Session 2
Klara Nahrstedt Spring 2011
Chapter 2 Scheduling.
Chapter 8 – Processor Scheduling
CPU Scheduling.
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
CS 143A - Principles of Operating Systems
Process Scheduling B.Ramamurthy 11/18/2018.
CPU Scheduling G.Anuradha
Module 5: CPU Scheduling
3: CPU Scheduling Basic Concepts Scheduling Criteria
Chapter5: CPU Scheduling
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
Chapter 5: CPU Scheduling
Lecture 2 Part 3 CPU Scheduling
Process Scheduling B.Ramamurthy 2/23/2019.
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Presentation transcript:

page 110/9/2015 CSE 40373/60373: Multimedia Systems So far…  RMS - task with highest rate has highest priority  EDF – earliest deadline first  Tasks can be preemptive or non-preemptive Slides courtesy Prof. Nahrstedt

page 210/9/2015 CSE 40373/60373: Multimedia Systems Example  Consider the following preemptive RT tasks and their characteristics  T1: p1 = 50ms, e1=10ms  T2: p2 = 100ms, e2=20ms  T3: p3 = 200ms, e3=50ms  T4: p4 = 100ms, e4=20ms  Are these tasks schedulable via RMS?  If yes, what is the feasible schedule?  Are these tasks schedulable via EDF?  If yes, what is the feasible schedule?

page 310/9/2015 CSE 40373/60373: Multimedia Systems Conclusion  RMS and EDF are basic policies for real-time scheduling systems  For multimedia systems, soft-real-time scheduling (SRT) concepts needed, connecting reservation- based and adaption-based SRT

page 410/9/2015 CSE 40373/60373: Multimedia Systems Other In-Time Scheduling Policies  Least Laxity First Scheduling Policy  Policy: calculate laxity of tasks and task with shortest remaining laxity is scheduled first  Laxity lk := (s + (k-1)p + d) – (t + e)  k – kth period, t – actual time  Optimal dynamic algorithm  Problems:  Determination of laxity is inexact as algorithm assumes always worst case when calculating laxity  Laxity of waiting tasks changes over time, hence tasks can preempt each other several times without dispatching new task (high number of context switches)  Laxity calculation means additional overhead

page 510/9/2015 CSE 40373/60373: Multimedia Systems DSRT (Dynamic Soft Real-Time Scheduling)  CPU Service Classes  Mapping CPU Service Classes into a Multiprocessor Partitioning Design  Execution Flow of a SRT Process Source: Hao-hua Chu 1999

page 610/9/2015 CSE 40373/60373: Multimedia Systems 6 CPU Service Classes Service ClassesSpecification ParametersGuaranteed PCPT (Periodic Constant Processing Time) P = Period PPT = Peak Processing Time PPT PVPT (Periodic Variable Processing Time) P = Period SPT = Sustainable Processing Time PPT = Peak Processing Time BT = Burst Tolerance SPT ACPU (Aperiodic Constant Processor Utilization) PPU = Peak Processor Utilization PPU Event Relative Deadline PPT = Peak Processing Time PPT

page 710/9/2015 CSE 40373/60373: Multimedia Systems Periodic Constant Processing Time Class  Example Usage Pattern: Peak Processing Time=10ms Period = 100ms Time(ms)

page 810/9/2015 CSE 40373/60373: Multimedia Systems Periodic Variable Processing Time Class  Example Usage Pattern: 8 Period = 100ms Peak Processing Time = 30ms Sustainable Processing Time = 15ms Burst Tolerance = 7ms Time(ms)

page 910/9/2015 CSE 40373/60373: Multimedia Systems 9 Multiprocessor Partitioning Design Guaranteed PartNon-guaranteed Part PCPT Processes PVPT Processes RT SchedulerOverrun SchedulerTS Scheduler TS Processes Reserved RunOverrun BurstReserved RunOverrun Processor #1 Processor #2 RT PartitionOverrun PartitionTS Partition RT PartitionOverrun PartitionTS Partition

page 1010/9/2015 CSE 40373/60373: Multimedia Systems 10 Execution Flow of a SRT Process Probe Admission Control Monitor/ Conformance Test Probing Phase Reservation Phase Execution Phase Adaptation Extract Reservation Contract Processor Binding Adjusted Contract SRT Process Scheduling

page 1110/9/2015 CSE 40373/60373: Multimedia Systems Smart Offline Probing (1)  Goal: Extract a reservation.  Determine the most suitable Service Class and Parameters.  Avoid over/under reserve resources.  Needed because:  Processor usage is hardware platform dependent.  Processor usage is input dependent.

page 1210/9/2015 CSE 40373/60373: Multimedia Systems Smart Probing (2)  DSRT runs a few iterations of SRT applications without reservation.  DSRT monitors the usage iteration by iteration.  DSRT analyzes the usage history. Processor Usage Iteration Number Estimate a Reservation

page 1310/9/2015 CSE 40373/60373: Multimedia Systems 13 Smart Probing (3)  Compute average processor usage = 50ms  Compute peak processor usage = 62ms.  Max Burst = 12ms 50ms 12ms 50ms 40ms 50ms 62ms 55ms 43ms 60ms 55ms 10ms 50ms 5ms

page 1410/9/2015 CSE 40373/60373: Multimedia Systems 14 Partition Scheduling RT SchedulerOverrun SchedulerTS Scheduler Processor #1 Processor #2 RT PartitionOverrun PartitionTS Partition RT PartitionOverrun PartitionTS Partition Top-Level Scheduler Preemptive EDF Multi-Level Round Robin Priority Queues Kernel Scheduler Proportional Sharing

page 1510/9/2015 CSE 40373/60373: Multimedia Systems 15 RT Partition Scheduler Waiting Queue: (Sorted with the earliest released time) Processor #1 p p p Runnable Queue: (Sorted with the earliest deadline) (1) admitted (2a) finished one iteration (2b) overrunning (3) released for next iteration Overrun Partition Queues

page 1610/9/2015 CSE 40373/60373: Multimedia Systems Overrun Partition Scheduler Burst Queue (FIFO) Overrun Queue (FIFO) Permanent Non-conforming Queue (FIFO) p (1a) Conformed? (1b) Nonconformed? (1c) Nonconformed frequently? p (2) Miss Deadline Lowest Priority Highest Priority

page 1710/9/2015 CSE 40373/60373: Multimedia Systems Adaptation Scene #2 Scene #1 Frame 275  Adjust Reservation.  3 Strategies  Exponential Average  Range  Statistical

page 1810/9/2015 CSE 40373/60373: Multimedia Systems Exponential Average Adaptation Strategy 18  Specification:  Window Size (ws).  Alpha (  )  X i = Guaranteed Parameter in a reservation.  X i-1 = Actual Usage. X1X1 X ws X2X2 X 2ws X 3ws X ws-1...X3X3 X ws+1... Adaptation Points Iteration Number

page 1910/9/2015 CSE 40373/60373: Multimedia Systems 19 Experiment Setup  Run 8 TS processes and 5 SRT processes concurrently.  TS 1-6 : Computational intensive programs.  TS 7-8 : Compilation programs.  SRT 1 : A MPEG player at 10 FPS.  Probing (PVPT class, P=100ms,  SPT=28ms, PPT=40ms, BT=11ms).  Adaptation Strategy: (Statistical, f = 20%, ws = 20).

page 2010/9/2015 CSE 40373/60373: Multimedia Systems 20 Experimental Setup (Cont.)  SRT 2 : A MPEG player at 20 FPS.  Probing (PVPT class, P=50ms, SPT=14ms, PPT=21ms, BT=6ms)  SRT 3 : A sampling program.  Probing(PCPT class, P=50ms, PPT=10ms)  SRT 4 : A Java RocksInSpace game.  (PCPT class, P=100ms, PPT=30ms).  SRT 5 : Misbehaving greedy program.  (PCPT class, P=500ms, PPT=10ms).

page 2110/9/2015 CSE 40373/60373: Multimedia Systems 21 Experimental Result SRT1: MPEG player With P=100ms SRT2: MPEG player with P=50ms.

page 2210/9/2015 CSE 40373/60373: Multimedia Systems 22 Experimental Result (Cont.) SRT3: Sampling program with P=50ms. SRT4: Java game with P=100ms.

page 2310/9/2015 CSE 40373/60373: Multimedia Systems Conclusion (Over-provisioning Approach)  Current Approach:  To achieve throughput - overprovision of resources (fast processors, large disks, fast I/O bus, high-speed networks), and exclusive usage of resources  To achieve timing - overprovision CPU, exclusive usage of resources, application-dependent scheduling Current Thesis: With over-provisioning we get Quality of Service !!

page 2410/9/2015 CSE 40373/60373: Multimedia Systems Conclusion (Problems with Over- provisioning)  Violation of Timing Guarantees in Exclusive Case (head-of-line blocking)  Sensory and Video Data Processing/Transmission  Violation of Timing/Throughput Guarantees in Shared Case (greedy applications, flows)  UDP flows versus TCP Flows  Last Mile Problem (not everywhere is over- provisioning possible)  Telescopes, University Campus  Need support of QoS in OS towards multimedia tasks

page 2510/9/2015 CSE 40373/60373: Multimedia Systems So far…  Operating system scheduling needs to be aware of the temporal constraints for processing real time multimedia  Reservation based for performance guarantees and adaptive for flexibility and higher resource utilization