Klara Nahrstedt Spring 2011

Slides:



Advertisements
Similar presentations
Simulation of Feedback Scheduling Dan Henriksson, Anton Cervin and Karl-Erik Årzén Department of Automatic Control.
Advertisements

CPU Scheduling Tanenbaum Ch 2.4 Silberchatz and Galvin Ch 5.
CS 149: Operating Systems February 3 Class Meeting
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
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.
Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.
Project 2 – solution code
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
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.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
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.
Page 110/9/2015 CSE 40373/60373: Multimedia Systems So far…  RMS - task with highest rate has highest priority  EDF – earliest deadline first  Tasks.
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.
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.
CompSci 143A1 5. Process and thread scheduling 5.1 Organization of Schedulers – Embedded and Autonomous Schedulers – Priority Scheduling 5.2 Scheduling.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 18 – Multimedia Transport (Part 1) Klara Nahrstedt Spring 2014.
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.
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 32 – Multimedia OS Klara Nahrstedt Spring 2010.
Scheduling.
Real-Time Operating Systems RTOS For Embedded systems.
Embedded System Scheduling
REAL-TIME OPERATING SYSTEMS
CS 414 – Multimedia Systems Design Lecture 31 – Media Server (Part 5)
Chapter 6: CPU Scheduling (Cont’d)
Copyright ©: Nahrstedt, Angrave, Abdelzaher
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Processes and Threads Processes and their scheduling
Uniprocessor Scheduling
Networks and Operating Systems: Exercise Session 2
Chapter 2 Scheduling.
Klara Nahrstedt Spring 2010
Chapter 8 – Processor Scheduling
Chapter 2.2 : Process Scheduling
Chapter 5: CPU Scheduling
A Framework for Automatic Resource and Accuracy Management in A Cloud Environment Smita Vijayakumar.
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
ICS 143 Principles of Operating Systems
CS 143A - Principles of Operating Systems
Process Scheduling B.Ramamurthy 11/18/2018.
CPU Scheduling G.Anuradha
Module 5: CPU Scheduling
Operating System Concepts
3: CPU Scheduling Basic Concepts Scheduling Criteria
Chapter5: CPU Scheduling
Smita Vijayakumar Qian Zhu Gagan Agrawal
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
CPU SCHEDULING.
Networked Real-Time Systems: Routing and Scheduling
Multiprocessor and Real-Time Scheduling
Chapter 6: 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
Real-Time Process Scheduling Concepts, Design and Implementations
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Real-Time Process Scheduling Concepts, Design and Implementations
Module 5: CPU Scheduling
Presentation transcript:

Klara Nahrstedt Spring 2011 CS 414 – Multimedia Systems Design Lecture 32 – Process Management (Part 2) Klara Nahrstedt Spring 2011 CS 414 - Spring 2011

Administrative MLC application ‘mi-clicker’ is published on the Android Market under “MLC Edu App”. Check the class website for a document “Getting Started” with the mi-clicker!!! Starting Monday, we will use the phones at the beginning of each class, so bring phones to the class. CS 414 - Spring 2011

Outline EDF vs RMS Dynamic Soft Real Time Scheduling CPU service classes Probing concept Overrun- adaptation concept CS 414 - Spring 2011

Admission Control (for preemptive tasks) Schedulability test for RMS Schedulability test for EDF CS 414 - Spring 2011

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? CS 414 - Spring 2011

DSRT (Dynamic Soft Real-Time Scheduling) – Example of a Multimedia CPU Scheduler Multiple CPU Service Classes Schedule real-time and not real-time tasks in an integrated fashion Execution Flow of a SRT Process Possible Mapping CPU Service Classes into a Multiprocessor Partitioning Design Source: Hao-hua Chu 1999 CS 414 - Spring 2011

CPU Service Classes Service Classes Specification Parameters Guaranteed 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 PPU = Peak Processor Utilization Relative Deadline PPT = Peak Processing Time Event PPT CS 414 - Spring 2011

Periodic Constant Processing Time Class Example Usage Pattern: Peak Processing Time=10ms Period = 100ms 10 110 210 100 200 Time(ms) Processing IIIIIIIIIII frames CS 414 - Spring 2011

Periodic Variable Processing Time Class Example Usage Pattern: Period = 100ms Peak Processing Time = 30ms Sustainable Processing Time = 15ms Burst Tolerance = 7ms 15 120 210 100 200 Time(ms) Processing of IPBBPI frames CS 414 - Spring 2011

Execution Flow of a SRT Process Probing Phase Execution Phase Reservation Phase Scheduling Probe Admission Control Extract Reservation Monitor/ Conformance Test Contract Processor Binding Adaptation SRT Process Adjusted Contract CS 414 - Spring 2011

C++ APIs CpuApi cpu; CpuReservation reservation; // Probing Phase; cpu.probe(); cpu.start(); for (int i=0; i<numProbeIterations; i++) { doJob(); cpu.yield(); } cpu.stop(); cpu.probeEnd(); cpu.probeMatch(&reservation); // Reservation Phase cpu.reserve(reservation); cpu.setAdaptStrategy(strategy); // Execution Phase cpu.start(); for (;;) { doJob(); cpu.yield(); } cpu.stop(); cpu.free(); CS 414 - Spring 2011

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. CS 414 - Spring 2011

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. Estimate a Reservation Processor Usage Iteration Number CS 414 - Spring 2011

Smart Probing (3) It is Periodic Variable Processing Time (PVPT) Compute average processor usage = 50ms Compute peak processor usage = 62ms. Max Burst = 12ms It is Periodic Variable Processing Time (PVPT) 40ms 50ms 62ms 43ms 55ms 12ms 40ms 50ms 62ms 55ms 60ms 10ms 5ms 50ms 50ms 50ms 50ms 50ms

Multiprocessor Partitioning Design Guaranteed Part Non-guaranteed Part PCPT Processes Reserved Run Overrun PVPT Processes Reserved Run Burst Overrun TS Processes RT Scheduler Overrun Scheduler TS Scheduler Processor #1 RT Partition Overrun Partition TS Partition Processor #2 RT Partition Overrun Partition TS Partition CS 414 - Spring 2011

Admission Control Test Given a reservation request, determine Resource Availability. (1) + (2) Processor Binding. (2) Preemptive Earliest Deadline First: CS 414 - Spring 2011

Partition Scheduling Processor #1 RT Partition Overrun Partition Top-Level Scheduler Proportional Sharing RT Scheduler Overrun Scheduler TS Scheduler Multi-Level Round Robin Priority Queues Preemptive EDF Kernel Scheduler Processor #1 RT Partition Overrun Partition TS Partition Processor #2 RT Partition Overrun Partition TS Partition CS 414 - Spring 2011

RT Partition Scheduler Processor #1 Waiting Queue: (Sorted with the earliest released time) p (2a) finished one iteration (3) released for next iteration p (1) admitted p Runnable Queue: (Sorted with the earliest deadline) (2b) overrunning Overrun Partition Queues CS 414 - Spring 2011

Overrun Partition Scheduler Highest Priority Burst Queue (FIFO) (2) Miss Deadline p (1a) Conformed? Overrun Queue (FIFO) (1b) Nonconformed? p Permanent Non-conforming Queue (FIFO) (1c) Nonconformed frequently? Lowest Priority CS 414 - Spring 2011

Adaptation Adjust Reservation. Adaptive Strategy Exponential Average Scene #1 Scene #2 Adjust Reservation. Adaptive Strategy Exponential Average CS 414 - Spring 2011 Frame 275

Exponential Average Adaptation Strategy ... Xws-1 Xws Xws+1 ... X2ws ... X3ws Iteration Number Adaptation Points Specification: Window Size (ws). Alpha () Xi= Guaranteed Parameter in a reservation. Xi-1 = Actual Usage. CS 414 - Spring 2011

User-level Priority Dispatch Highest Priority (5) Dispatched Process runs for T ms. (4) Scheduler sleeps. Fixed RT Priority (3) Scheduler sets Timer for T ms. N DSRT Scheduler Process (6) Timer interrupts Scheduler N-1 Dispatched Process . ....... (2) Set Processor Affinity. ....... . Time Sharing Processes (5) Decrease Priority . ....... (1) Increase Priority. Dynamic TS Priority ....... RT Process Pool Lowest Priority CS 414 - Spring 2011

Experiment Setup Run 8 TS processes and 5 SRT processes concurrently. TS1-6: Computational intensive programs. TS7-8: Compilation programs. SRT1: A MPEG player at 10 FPS. Probing (PVPT class, P=100ms, SPT=28ms, PPT=40ms, BT=11ms). Adaptation Strategy: (Statistical, f = 20%, ws = 20). CS 414 - Spring 2011

Experimental Setup (Cont.) SRT2: A MPEG player at 20 FPS. Probing (PVPT class, P=50ms, SPT=14ms, PPT=21ms, BT=6ms) SRT3: A sampling program. Probing(PCPT class, P=50ms, PPT=10ms) SRT4: A Java RocksInSpace game. (PCPT class, P=100ms, PPT=30ms). SRT5: Misbehaving greedy program. (PCPT class, P=500ms, PPT=10ms). CS 414 - Spring 2011

Experimental Result SRT2: MPEG player with P=50ms. CS 414 - Spring 2011

Experimental Result (Cont.) SRT3: Sampling program with P=50ms. SRT4: Java game with P=100ms. CS 414 - Spring 2011

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 !! CS 414 - Spring 2011

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 CS 414 - Spring 2011