CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 31 – Multimedia OS (Part 1) Klara Nahrstedt Spring 2011.

Slides:



Advertisements
Similar presentations
CS 149: Operating Systems February 3 Class Meeting
Advertisements

OS, , Part II CPU Scheduling Department of Computer Engineering, PSUWannarat Suntiamorntut.
CH 5. CPU Scheduling Basic Concepts F CPU Scheduling  context switching u CPU switching for another process u saving old PCB and loading.
CPE555A: Real-Time Embedded Systems
CPU Scheduling Questions answered in this lecture: What is scheduling vs. allocation? What is preemptive vs. non-preemptive scheduling? What are FCFS,
CPU SCHEDULING RONG ZHENG. OVERVIEW Why scheduling? Non-preemptive vs Preemptive policies FCFS, SJF, Round robin, multilevel queues with feedback, guaranteed.
Process Scheduling Chapter 4.
© Ibrahim Korpeoglu Bilkent University
CS 311 – Lecture 23 Outline Kernel – Process subsystem Process scheduling Scheduling algorithms User mode and kernel mode Lecture 231CS Operating.
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.
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.
Cs238 CPU Scheduling Dr. Alan R. Davis. CPU Scheduling The objective of multiprogramming is to have some process running at all times, to maximize CPU.
5: CPU-Scheduling1 Jerry Breecher OPERATING SYSTEMS SCHEDULING.
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.
1 Lecture 10: Uniprocessor Scheduling. 2 CPU Scheduling n The problem: scheduling the usage of a single processor among all the existing processes in.
1Chapter 05, Fall 2008 CPU Scheduling The CPU scheduler (sometimes called the dispatcher or short-term scheduler): Selects a process from the ready queue.
Chapter 6: CPU Scheduling
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 5 Operating Systems.
CS3530 OPERATING SYSTEMS Summer 2014 Processor Scheduling Chapter 5.
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
More Scheduling cs550 Operating Systems David Monismith.
MM Process Management Karrie Karahalios Spring 2007 (based off slides created by Brian Bailey)
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.
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.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
CPU Scheduling CSCI 444/544 Operating Systems Fall 2008.
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.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 7: CPU Scheduling Chapter 5.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
Operating Systems Scheduling. Bursts of CPU usage alternate with periods of waiting for I/O. (a) A CPU-bound process. (b) An I/O-bound process. Scheduling.
Cpr E 308 Spring 2005 Process Scheduling Basic Question: Which process goes next? Personal Computers –Few processes, interactive, low response time Batch.
ITFN 2601 Introduction to Operating Systems Lecture 4 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.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 5 CPU Scheduling Slide 1 Chapter 5 CPU Scheduling.
6.1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 31 – Process Management (Part 1) Klara Nahrstedt Spring 2009.
Lecture Topics: 11/15 CPU scheduling: –Scheduling goals and algorithms.
CS333 Intro to Operating Systems Jonathan Walpole.
For a good summary, visit:
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
CPU Scheduling CSCI Introduction By switching the CPU among processes, the O.S. can make the system more productive –Some process is running at.
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 32 – Multimedia OS Klara Nahrstedt Spring 2010.
CPU Scheduling Operating Systems CS 550. Last Time Deadlock Detection and Recovery Methods to handle deadlock – Ignore it! – Detect and Recover – Avoidance.
Operating Systems Scheduling. Scheduling Short term scheduler (CPU Scheduler) –Whenever the CPU becomes idle, a process must be selected for execution.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
3. CPU Scheduling. CPU Scheduling Process execution – a cycle of CPU execution and I/O wait – figure Preemptive Non-Preemptive.
1 Lecture 5: CPU Scheduling Operating System Fall 2006.
Lecture 5 Scheduling. Today CPSC Tyson Kendon Updates Assignment 1 Assignment 2 Concept Review Scheduling Processes Concepts Algorithms.
Scheduling.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Klara Nahrstedt Spring 2011
Chapter 8 – Processor Scheduling
Process Scheduling B.Ramamurthy 9/16/2018.
Lecture 24: Process Scheduling Examples and for Real-time Systems
Chapter 6: CPU Scheduling
Process Scheduling B.Ramamurthy 11/18/2018.
Chapter 6: CPU Scheduling
Lecture 21: Introduction to Process Scheduling
Operating System Concepts
TDC 311 Process Scheduling.
CPU SCHEDULING.
Process Scheduling B.Ramamurthy 2/23/2019.
Lecture 21: Introduction to Process Scheduling
Presentation transcript:

CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 31 – Multimedia OS (Part 1) Klara Nahrstedt Spring 2011

Administrative MP3 is out MP3 Help Session  Wednesday, April 13, 7-8pm in 1304 Siebel Center mi-clicker discussion CS Spring 2011

CPU Process/Thread Scheduling Maintain many programs in memory Determine how to best schedule them Requires information about the processes and an understanding of the system goals Switch among processes rapidly so each user perceives direct ownership of system CS Spring 2011

CPU Scheduling Evaluation Criteria Throughput: processes completed per unit time Turnaround: from submission to termination Wait: time waiting in the ready queue Response: from user request to system response Utilization: how busy the CPU is over time Want predictable system behavior CS Spring 2011

Scheduling Algorithms FCFS Shortest Job First Priority scheduling Round-robin Multi-level queue Rate monotonic Earliest deadline first For General Purpose Process CPU Scheduling For RT/Multimedia Process CPU Scheduling CS Spring 2011

Real-time/Multimedia Processing Requirements Need to process continuous multimedia data  Processing occurs in predetermined, usually periodic intervals  Processing must be completed by certain deadlines Need RT process manager  Perform admission control  Determine schedule  Perform reservation  Schedule to give processing guarantees CS Spring 2011

RT/Multimedia Processing Requirements Main Problem: How to find a feasible schedule? Conflicting Goals/Problems: How do we schedule multimedia (RT) processes so that 1. non-RT processes do not starve when RT process is running 2. RT process is not subject to priority inversion CS Spring 2011

Model in RT Scheduling Task (Process) – schedulable unit Task characterized by  Timing constraints  Resource requirements Assumptions  Periodic tasks without precedence relations Time constraints  s – task starting point  e – task processing time  d – task deadline  p – task period CS Spring 2011

Periodic Constant Processing Time Tasks Example Usage Pattern: Peak Processing Time=10ms Period = 100ms Time(ms) CS Spring 2011

Periodic Variable Processing Time Tasks Example Usage Pattern: Period = 100ms Peak Processing Time = 30ms Sustainable Processing Time = 15ms Burst Tolerance = 7ms Time(ms) CS Spring 2011

Model of RT Scheduling Congestion avoidance deadline  If period at (k-1) step is equal to ready (start) time of period k Tasks: preemptive vs. non-preemptive Main goal of RT Scheduling:  find feasible schedule of all periodic tasks so that newly arriving task and all previous admitted tasks finish processing in every period according to their deadline CS Spring 2011

Model of RT Scheduling Must have Schedulability (Admission) Test for RT tasks What is the performance metric for RT tasks?  Guarantee ratio := number of guaranteed tasks/total number of tasks  Process utilization (U): CS Spring 2011

Scheduling Policies of RT Tasks Rate- Monotonic Scheduling (RMS)  Designed/proved by C.L. Liu and Layland 1973  Policy: task with highest rate has highest priority  Static and optimal, priority-driven Optimal means that there no other static algorithm that is able to schedule a RT task which can’t be scheduled by RMS algorithm Assumptions:  Tasks are periodic  Each task must complete before next request  All tasks are independent  Run-time of each task request is constant  Any non-periodic task has no required deadline CS Spring 2011

Example of RMS CS Spring 2011

Scheduling Policies for RT Tasks Earliest Deadline First (EDF) Policy  Optimal dynamic algorithm  Produces valid schedule if one exists  Complexity O(n 2 )  Upper bound of process utilization 100%  Policy: task with earliest deadline has highest priority CS Spring 2011

Example of EDF CS Spring 2011

Comparison between RMS and EDF CS Spring 2011

Admission Control (for preemptive tasks) Schedulability test for RMS Schedulability test for EDF CS 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?  If yes, what is the feasible schedule? CS Spring 2011

Preemptive vs. Non-preemptive Scheduling CS Spring 2011

Conclusion RMS and EDF are basic policies for real- time scheduling policies Most of the Real-time tasks are guided by these scheduling policies CS Spring 2011