CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 31 – Process Management (Part 1) Klara Nahrstedt Spring 2009.

Slides:



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

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,
1 Uniprocessor Scheduling Types of scheduling –The aim of processor scheduling is to assign processes to be executed by the processor so as to optimize.
CPU Scheduling CPU Scheduler Performance metrics for CPU scheduling
CPU SCHEDULING RONG ZHENG. OVERVIEW Why scheduling? Non-preemptive vs Preemptive policies FCFS, SJF, Round robin, multilevel queues with feedback, guaranteed.
WELCOME TO THETOPPERSWAY.COM
Chapter 3: CPU Scheduling
© Ibrahim Korpeoglu Bilkent University
CS444/CS544 Operating Systems Scheduling 1/31/2007 Prof. Searleman
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.
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.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
Slide 6-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 6 Threads and Scheduling 6.
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.
Operating Systems Part III: Process Management (CPU Scheduling)
Chapter 6: CPU Scheduling
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
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.
Chapter 4 Processor Management
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.
Operating Systems Lecture Notes CPU Scheduling Matthew Dailey Some material © Silberschatz, Galvin, and Gagne, 2002.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Operating Systems Process Management.
CPU Scheduling CSCI 444/544 Operating Systems Fall 2008.
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.
3.1 : Resource Management Part2 :Processor Management.
Process A program in execution. But, What does it mean to be “in execution”?
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
Uniprocessor Scheduling
CIS250 OPERATING SYSTEMS Chapter 6 - CPU Scheduling Basic Concepts The objective of multi-programming is have a program running at all times Maximize.
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.
Lecture Topics: 11/15 CPU scheduling: –Scheduling goals and algorithms.
CS333 Intro to Operating Systems Jonathan Walpole.
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.
Lecture 5 Scheduling. Today CPSC Tyson Kendon Updates Assignment 1 Assignment 2 Concept Review Scheduling Processes Concepts Algorithms.
Lecturer 5: Process Scheduling Process Scheduling  Criteria & Objectives Types of Scheduling  Long term  Medium term  Short term CPU Scheduling Algorithms.
Scheduling.
OPERATING SYSTEMS CS 3502 Fall 2017
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Uniprocessor Scheduling
Networks and Operating Systems: Exercise Session 2
Chapter 8 – Processor Scheduling
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Andy Wang Operating Systems COP 4610 / CGS 5765
Lecture 21: Introduction to Process Scheduling
Operating System Concepts
TDC 311 Process Scheduling.
CPU SCHEDULING.
Processes and operating systems
Lecture 21: Introduction to Process Scheduling
Chapter 6: Scheduling Algorithms Dr. Amjad Ali
Presentation transcript:

CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 31 – Process Management (Part 1) Klara Nahrstedt Spring 2009

Outline MP4 is out, Start early Discussion Session, April 14, 7pm in 3401 SC Competition on May 1, 2009, 5-6:30pm in 216 SC Deadline April 30 (pre-competition to decide on the finalists)  Exact rules, scenarios of the competition will be posted next Monday, April 20. All should come, pizza and 1,2,3 rd prices of the competition will be provided between 6:30-7pm on May 1 in 0216 SC CS Spring 2009

CPU 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

Process State New – being created Terminated – finishing execution Running – executing on the CPU Waiting – blocking on an event Ready – waiting for the CPU

Process Control Block Represents a process in the OS  process state  program counter  CPU registers  scheduling information  virtual memory information (e.g., page tables)  I/O status information

Resource Queues Sem Queue head tail Ready Queue head tail PCB 6 State Registers … Disk Queue head tail PCB 5 State Registers … PCB 4 State Registers … PCB 3 State Registers … PCB 2 State Registers … PCB 1 State Registers …

CPU Scheduler When CPU becomes idle, select next process from the ready queue CPU may become idle when:  allotted time slice expires  interrupt occurs (timer, I/O, user input)  application makes an I/O request  application terminates

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

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

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 2009

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 2009

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 2009

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 2009

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 2009

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 2009

Example of RMS CS Spring 2009

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 2009

Example of EDF CS Spring 2009

Comparison between RMS and EDF CS Spring 2009

Admission Control (for preemptive tasks) Schedulability test for RMS Schedulability test for EDF CS Spring 2009

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 2009

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 Next lecture – we look at DSRT system that shows implementation of hybrid SRT systems CS Spring 2009