Virtual-Time Round-Robin: An O(1) Proportional Share Scheduler By Jason Nieh, etc Xiaojun Wang 10/07/2005.

Slides:



Advertisements
Similar presentations
CPU Scheduling.
Advertisements

Virtual-Time Round-Robin: An O(1) Proportional Share Scheduler Jason Nieh; Chris Vaill; & Hua Zhong Columbia University Presented By: Parang Saraf.
Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Operating Systems CPU Scheduling. Agenda for Today What is Scheduler and its types Short-term scheduler Dispatcher Reasons for invoking scheduler Optimization.
Chapter 3: CPU Scheduling
CS 311 – Lecture 23 Outline Kernel – Process subsystem Process scheduling Scheduling algorithms User mode and kernel mode Lecture 231CS Operating.
Chapter 8 – Processor Scheduling Outline 8.1 Introduction 8.2Scheduling Levels 8.3Preemptive vs. Nonpreemptive Scheduling 8.4Priorities 8.5Scheduling Objectives.
Scheduling in Batch Systems
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.
What we will cover…  CPU Scheduling  Basic Concepts  Scheduling Criteria  Scheduling Algorithms  Evaluations 1-1 Lecture 4.
Operating System Process Scheduling (Ch 4.2, )
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
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.
Real Time Operating Systems Scheduling & Schedulers Course originally developed by Maj Ron Smith 8-Oct-15 Dr. Alain Beaulieu Scheduling & Schedulers- 7.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
CPU Scheduling CSCI 444/544 Operating Systems Fall 2008.
Fair Queueing. 2 First-Come-First Served (FIFO) Packets are transmitted in the order of their arrival Advantage: –Very simple to implement Disadvantage:
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
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.
Packet Scheduling: SCFQ, STFQ, WF2Q Yongho Seok Contents Review: GPS, PGPS SCFQ( Self-clocked fair queuing ) STFQ( Start time fair queuing ) WF2Q( Worst-case.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
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.
1 Fair Queuing Hamed Khanmirza Principles of Network University of Tehran.
CS333 Intro to Operating Systems Jonathan Walpole.
Stride Scheduling: Deterministic Proportional-Share Resource Management Carl A. Waldspurger, William E. Weihl MIT Laboratory for Computer Science Presenter:
Lecture 4 CPU scheduling. Basic Concepts Single Process  one process at a time Maximum CPU utilization obtained with multiprogramming CPU idle :waiting.
CPU scheduling.  Single Process  one process at a time  Maximum CPU utilization obtained with multiprogramming  CPU idle :waiting time is wasted 2.
Basic Concepts Maximum CPU utilization obtained with multiprogramming
1 Lecture 5: CPU Scheduling Operating System Fall 2006.
1 Chapter 5: CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms.
Virtual-Time Round-Robin: An O(1) Proportional Share Scheduler Jason Nieh, Chris Vaill, Hua Zhong Columbia University Presented by Adam Binford.
CPU SCHEDULING.
Dan C. Marinescu Office: HEC 439 B. Office hours: M, Wd 3 – 4:30 PM.
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Chapter 5a: CPU Scheduling
Chapter 2 Scheduling.
Chapter 8 – Processor Scheduling
A Framework for Automatic Resource and Accuracy Management in A Cloud Environment Smita Vijayakumar.
Chapter 6: CPU Scheduling
Lottery Scheduling Ish Baid.
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
Variations of Weighted Fair Queueing
Operating System Concepts
3: CPU Scheduling Basic Concepts Scheduling Criteria
Fair Queueing.
Chapter5: CPU Scheduling
Operating systems Process scheduling.
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
Virtual-Time Round-Robin: An O(1) Proportional Share Scheduler
Variations of Weighted Fair Queueing
Process Scheduling Decide which process should run and for how long
Chapter 5: CPU Scheduling
Lecture 2 Part 3 CPU Scheduling
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
CPU SCHEDULING SIMULATION
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 6: CPU Scheduling
CPU Scheduling: Basic Concepts
Module 5: CPU Scheduling
Fair Queueing.
Presentation transcript:

Virtual-Time Round-Robin: An O(1) Proportional Share Scheduler By Jason Nieh, etc Xiaojun Wang 10/07/2005

OS Fall 20052Oct. 07, 2005 Outline Proportional Share Scheduling Weighted Round Robin Weighted Fair Queueing Virtual-Time Round-Robin Summary

OS Fall 20053Oct. 07, 2005 Proportional Share Scheduling Given a set of clients with associated weights, a proportional share scheduler should allocate resources to each client in proportion to its respective weight. Why useful? Administrative Purposes −Allocate resource to users according to their weights (for example, money they pay) QoS Goals −Video, audio applications (minimize jitter)

OS Fall 20054Oct. 07, 2005 Evaluation Criteria Two Evaluation Criteria Accuracy of proportional sharing Scheduling overhead VTRR High proportional sharing accuracy (WFQ) Low scheduling overhead (RR)

OS Fall 20055Oct. 07, 2005 Proportional Fairness Some notations The proportional share of client A The amount of service received by A during time interval ( t1, t2 ). The service time error for A over ( t1, t2 ) The goal of a proportional share scheduler is to minimize E over all time intervals.

OS Fall 20056Oct. 07, 2005 Weighted Round Robin Algorithm Clients are placed in a queue and executed in turn (same frequency). When being executed, each client is assigned a time quantum equal to its share (adjustable time quantum size). Evaluation Low scheduling overhead: O(1) Weak proportional fairness guarantee. The service time error can be quite large, especially when the share values are large.

OS Fall 20057Oct. 07, 2005 Weighted Fair Queueing Originally invented for scheduling network packets. Maintain a queue of clients sorted by their virtual finishing time, each time select the client with the smallest VFT. Different frequency, same time quantum size. Evaluation Good proportional sharing accuracy. High scheduling overhead: O(n), O(log n)

OS Fall 20058Oct. 07, 2005 Virtual Time Virtual Time: a measure of the degree to which a client has received its proportional allocation, relative to other clients. Virtual Finishing Time: the virtual time the client would have after executing for one time quantum. Q : time quantum, the duration of a standard time slice assigned to a client to execute suppose A is executed during (t, t+ Q )

OS Fall 20059Oct. 07, 2005 An Example of WFQ Goal of WFQ: Make all clients’ VT grow as even as possible. Executing Sequence ABAABC VT 1 0 A: 3B: 2C: 1 VT VFT

OS Fall Oct. 07, 2005 An Example of WFQ Service Time Error in time interval (0, t) Note the sum of the Errors of all clients is 0, and each client’s Error becomes 0 at the end of each cycle. Never falls below -1

OS Fall Oct. 07, 2005 Virtual-Time Round-Robin An accurate, low-overhead proportional share scheduler which combines the benefits of WRR and WFQ. Overview of Algorithm Sort clients in the run queue in descending order of their shares. Starting from beginning, run each client for one fixed time quantum. (reason of O(1)) Jump back to the beginning if a client has received more allocation than ideal case.

OS Fall Oct. 07, 2005 Client’s State Five values for each client: Share: used to sort the clients in the queue. VFT: used to decide when to jump back to the beginning (VFT inequality). Time counter: −Reset to share value at the beginning of each scheduling cycle. −Decrease by one when received a time quantum. −Become 0 at the end of each scheduling cycle. −Used to ensure perfect fairness is achieved at the end of each cycle. ID number Run state: runnable or not

OS Fall Oct. 07, 2005 Scheduler’s State Run queue, time quantum, total shares Queue virtual time: a measure of what a client’s VFT should be if it has received exactly its proportional share allocation. Goal of the algorithm: to make the VT of each client to be as close to QVT as possible.

OS Fall Oct. 07, 2005 VTRR Algorithm time counter invariant: for any two consecutive clients in the queue A and B, the counter value for B must always be no greater than the counter value for A. VFT inequality:

OS Fall Oct. 07, 2005 An Example of VTRR TQVT A: 3B: 2C: 1 TCVFTTCVFTTCVFT 0031/321/211 11/622/321/211 22/622/ /622/ / /61103/ /303/202 Time counter invariant VFT inequality: Execution Sequence ABCABA 2 <= 2 1/2 - 2/6 < 1/2 1 <= /6 < /6 < 1/2 Execute Check conditions

OS Fall Oct. 07, 2005 An Example of VTRR Virtual Time Grow Pattern Goal of VTRR: make each client’s VT stay close to QVT

OS Fall Oct. 07, 2005 An Example of VTRR Service Time Error in time interval (0, t)

OS Fall Oct. 07, 2005 Dynamic Considerations An on-line scheduling algorithm allows clients to be dynamically created, terminated, change run state, and change their share values. Insert client to running queue How to determine new client’s initial VFT and time counter? Remove non-runnable client from the queue Last-previous and last-next pointers. Change client’s position in the queue Remove, re-insert.

OS Fall Oct. 07, 2005 Complexity O(1) Select a client for execution Update current client’s variables Check next client Remove client from the queue Higher order operations: Sort the running queue: O(N logN) infrequent Reset time counter: O(N) / length(scheduling cycle) Insert client to the queue: −O(N) or O(log N), infrequent −O(1) last-previous & last-next −can be done in O(1) if the range of share values is fixed

OS Fall Oct. 07, 2005 Accuracy: Simulation Result VTRR vs. WRR service time error

OS Fall Oct. 07, 2005 Accuracy: Simulation Result VTRR vs. WFQ service time error

OS Fall Oct. 07, 2005 Overhead: Experiment Result Scheduling overhead

OS Fall Oct. 07, 2005 Summary VTRR High proportional sharing accuracy (comparable to WFQ) Low scheduling overhead (O(1)) Easy to implement (add/change < 100 lines of code in Linux) A promising solution for scheduling in large scale server systems. Progress Group Ratio Round-Robin: O(1) Proportional Share Scheduling for Uniprocessor and Multiprocessor Systems

OS Fall Oct. 07, 2005 Thank you! Questions?