IIS Progress Report 2016/01/18.

Slides:



Advertisements
Similar presentations
Chapter 5 Fundamental Algorithm Design Techniques.
Advertisements

CPU Scheduling Questions answered in this lecture: What is scheduling vs. allocation? What is preemptive vs. non-preemptive scheduling? What are FCFS,
Virtual Memory Introduction to Operating Systems: Module 9.
5: CPU-Scheduling1 Jerry Breecher OPERATING SYSTEMS SCHEDULING.
Distributed Process Management1 Learning Objectives Distributed Scheduling Algorithms Coordinator Elections Orphan Processes.
CPU-Scheduling Whenever the CPU becomes idle, the operating system must select one of the processes in the ready queue to be executed. The short term scheduler.
Chapter 6 CPU SCHEDULING.
Progress Report 2014/02/12. Previous in IPDPS’14 Energy-efficient task scheduling on per- core DVFS architecture ◦ Batch mode  Tasks with arrival time.
CPU Scheduling CSCI 444/544 Operating Systems Fall 2008.
An Energy-efficient Task Scheduler for Multi-core Platforms with per-core DVFS Based on Task Characteristics Ching-Chi Lin Institute of Information Science,
IIS Progress Report 2015/10/12. Problem Revisit Given a set of virtual machines, each contains some virtual cores with resource requirements. Decides.
Progress Report 2013/08/22. Model Modification Each core works under the same frequency due to hardware limitation. A task can have different processing.
Lecture Topics: 11/15 CPU scheduling: –Scheduling goals and algorithms.
CPU scheduling.  Single Process  one process at a time  Maximum CPU utilization obtained with multiprogramming  CPU idle :waiting time is wasted 2.
IIS Progress Report 2016/01/11. Goal Propose an energy-efficient scheduler that minimize the power consumption while providing sufficient computing resources.
CPU Scheduling Scheduling processes (or kernel-level threads) onto the cpu is one of the most important OS functions. The cpu is an expensive resource.
lecture 5: CPU Scheduling
CPU SCHEDULING.
Dan C. Marinescu Office: HEC 439 B. Office hours: M, Wd 3 – 4:30 PM.
Lecture on Design and Analysis of Computer Algorithm
Chapter 5a: CPU Scheduling
Networks and Operating Systems: Exercise Session 2
Wayne Wolf Dept. of EE Princeton University
April 6, 2001 Gary Kimura Lecture #6 April 6, 2001
Ching-Chi Lin Institute of Information Science, Academia Sinica
Process Scheduling B.Ramamurthy 9/16/2018.
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Process Scheduling B.Ramamurthy 11/18/2018.
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
OverView of Scheduling
3: CPU Scheduling Basic Concepts Scheduling Criteria
Process Scheduling B.Ramamurthy 12/5/2018.
Scheduling Adapted from:
TDC 311 Process Scheduling.
CSCI1600: Embedded and Real Time Software
Scheduling.
Chapter 6: CPU Scheduling
CPU SCHEDULING.
Outline Scheduling algorithms Multi-processor scheduling
CPU scheduling decisions may take place when a process:
Greedy Algorithms TOPICS Greedy Strategy Activity Selection
Chapter 6: CPU Scheduling
Process Scheduling Decide which process should run and for how long
Lecture 2 Part 3 CPU Scheduling
Process Scheduling B.Ramamurthy 2/23/2019.
Process Scheduling B.Ramamurthy 2/23/2019.
CSCI1600: Embedded and Real Time Software
Practical Session 8, Memory Management 2
Processor Scheduling Hank Levy 1.
Process Scheduling B.Ramamurthy 4/11/2019.
Process Scheduling B.Ramamurthy 4/7/2019.
Research on Embedded Hypervisor Scheduler Techniques
Uniprocessor scheduling
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
CS703 - Advanced Operating Systems
Shortest-Job-First (SJR) Scheduling
Chapter 6: CPU Scheduling
Chapter 5: CPU Scheduling
Module 5: CPU Scheduling
Chapter 6: Scheduling Algorithms Dr. Amjad Ali
Scheduling 21 May 2019.
Flexible Assembly Systems
Chapter 6: CPU Scheduling
Progress Report 2015/01/28.
Practical Session 9, Memory Management continues
Module 5: CPU Scheduling
Presentation transcript:

IIS Progress Report 2016/01/18

Goal Propose an energy-efficient scheduler that minimize the power consumption while providing sufficient computing resources in order to meet the expected throughput of each virtual core. Amount of workloads in a time period.

Model - Cores Assume n virtual cores, m physical cores. For every time period Virtual core i has expected throughput/ workload wi, wi ∈ W. Physical core j with frequency fj, fj ∈ F F: a set of available frequencies on the core.

Model – Power Consumption The power consumption P of core j is a function of fj and its load Lj. Lj = (the amount of workload on j) / fj. With given fj, P is linear to Lj. We write P as the following: m(fj): the gradient. cj: idle power

Objective Generate fj and a set of ai,j that where Constraints:

Re-write Objective Function Dynamic power + static/idle power

Multiple Multi-objective Fractional Knapsack Problem Each virtual core is a knapsack. Volume = 1, a weight requirement ω. Each physical core is a object Value = 1/m(f), Size = 1, and weight = f. Maximize the overall value, such that each knapsack contains at least ω weight.

Solution Two steps: Determine the frequency f of each core. Decide the ai,j.

Determine the Frequency m(fn)/fn : the dynamic power consumption per cycle. In real world CPUs, m(fn)/fn is a increasing function of fn. “Choose the frequencies evenly among every cores is more energy-efficient.”

Selecting Frequencies “Choose the frequencies evenly among every cores is more energy-efficient.” However, simply choose doesn’t works. Some wi may be larger than f.

Our Method Decide the fj, j = 0 ~ m-1 First sort wi in descending order, and set f0 ~ fm-1 as w0 ~ wm-1. While ∑ wi > ∑ fj , increase the smallest fj by one level until the condition is violated.

Assigning Cores Start from the largest wi, assign it to the core with largest frequency fj with spare resource sj. sj : spare resource on core j If wi > sj, assign (wi - sj) to core j+1, which is the core with second largest frequency fj+1 with spare resource. An approximation algorithm.

ε -approximation Our method: Optimal: fn: the n-th available frequency selection. f1 fx … f1 … fx

Core Assigning Result A set of ai,j: Core1 Core2 Core3 Core4 … vCPU1 0.9 vCPU2 0.1 0.7 vCPU3 0.3 0.4 vCPU4 0.5 vCPU5

Scheduling vCPUs Theoretically we can apply Open-Shop Scheduling Problem (OSSP) with preemption to generate a scheduling plan. However, scheduling plans generated this way may not be practical in real world. Do not consider interrupts, I/O delay … etc.

Energy Credit We transform ai,j into energy-credit of each virtual core i on physical core j. Executing a vCPU on a physical core consumes credits. Credits are re-filled every period of time. Schedule vCPUs according to their energy-credit.

Objective Each vCPU has a credit vector. Each entry is the amount of remaining credits to a physical core. Minimize the remaining credits of all vCPU before the credit refilling.

Selecting vCPU for Execution Each time a physical core becomes available, pick a vCPU with remaining credit for execution. Global run-queue v.s. per-core run-queue. Per-core run-queue Each core has a run-queue. A vCPU can only exist in one of the run-queue simultaneously. FIFO

Algorithm #1 For each core, keeps executing a vCPU until If 1.: Else: 1. An interrupt occurs 2. wait for I/O 3. the vCPU has no credit remains If 1.: Resume the vCPU after handling the interrupt. Else: Select the next vCPU with credit from the run-queue. If no available vCPU in run-queue: If 2: Idle else: Migrate a vCPU that has remaining credits of this core back.

Algorithm #2 For each core, keeps executing a vCPU until Else: If 1.: 1. An interrupt occurs 2. wait for I/O 3. the consecutive execution time of the vCPU exceeds t ms. If 1.: Resume the vCPU after handling the interrupt. Elif 2: Select the next vCPU with credit from the run-queue. If no available vCPU in run-queue: idle Else: Compute the expected waitng time.

Expected Waiting Time For each non-zero entry i of the credit vector of the vCPU: Compute the expected waiting time of the vCPU on core i. Simple way: n * t n: # of vCPUs with remaining credits in the run-queue. Migrate the vCPU to the core with least expected waiting time.

Observation Core1 Core2 Core3 Core4 … vCPU1 0.9 vCPU2 0.1 0.7 vCPU3 0.3 0.4 vCPU4 0.5 vCPU5 Since a vCPU can have credits on at most two cores using our assigning method, the overhead of finding which core to migrate is small.

Simulation Generate workloads with I/O and interrupts. The frequency and length follows some distributions. Compare the utilization, remaining credits and power consumption with other scheduling algorithms.

Some Comparing Algorithms Credit-based OSSP with preemption Most Remaining Credit First …

Discussion