EECS 750: Advanced Operating Systems. 01/28 /2015 Heechul Yun



Similar documents
Task Scheduling for Multicore Embedded Devices

CPU Scheduling Outline

Scheduling. Scheduling. Scheduling levels. Decision to switch the running process can take place under the following circumstances:

CPU Scheduling. Core Definitions

ò Paper reading assigned for next Thursday ò Lab 2 due next Friday ò What is cooperative multitasking? ò What is preemptive multitasking?

Linux Process Scheduling. sched.c. schedule() scheduler_tick() hooks. try_to_wake_up() ... CFS CPU 0 CPU 1 CPU 2 CPU 3

Chapter 5 Process Scheduling

Linux Load Balancing

Chapter 5 Linux Load Balancing Mechanisms

Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6

2. is the number of processes that are completed per time unit. A) CPU utilization B) Response time C) Turnaround time D) Throughput

Objectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling

Multi-core and Linux* Kernel

Job Scheduling Model

Linux scheduler history. We will be talking about the O(1) scheduler

Process Scheduling in Linux

Update on big.little scheduling experiments. Morten Rasmussen Technology Researcher

Making Multicore Work and Measuring its Benefits. Markus Levy, president EEMBC and Multicore Association

CHAPTER 1 INTRODUCTION

Overview of the Current Approaches to Enhance the Linux Scheduler. Preeti U. Murthy IBM Linux Technology Center

Effective Computing with SMP Linux

Multilevel Load Balancing in NUMA Computers

ò Scheduling overview, key trade-offs, etc. ò O(1) scheduler older Linux scheduler ò Today: Completely Fair Scheduler (CFS) new hotness

Linux Scheduler Analysis and Tuning for Parallel Processing on the Raspberry PI Platform. Ed Spetka Mike Kohler

An Adaptive Task-Core Ratio Load Balancing Strategy for Multi-core Processors

Comparing Power Saving Techniques for Multi cores ARM Platforms

Operating Systems. III. Scheduling.

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

Real-Time Scheduling 1 / 39

The CPU Scheduler in VMware vsphere 5.1

Real-Time Operating Systems for MPSoCs

High Performance Computing. Course Notes HPC Fundamentals

Memory Access Control in Multiprocessor for Real-time Systems with Mixed Criticality

Linux O(1) CPU Scheduler. Amit Gud amit (dot) gud (at) veritas (dot) com

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition

Process Scheduling II

CPU Scheduling. CSC 256/456 - Operating Systems Fall TA: Mohammad Hedayati

Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses

Thread level parallelism

A Survey of Parallel Processing in Linux

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems

ICS Principles of Operating Systems

Load Balancing on Speed

Comp 204: Computer Systems and Their Implementation. Lecture 12: Scheduling Algorithms cont d

Symmetric Multiprocessing

Load-Balancing for a Real-Time System Based on Asymmetric Multi-Processing

W4118 Operating Systems. Instructor: Junfeng Yang

Operating Systems. Design and Implementation. Andrew S. Tanenbaum Melanie Rieback Arno Bakker. Vrije Universiteit Amsterdam

Overview of the Linux Scheduler Framework

Outline. Operating Systems Design and Implementation. Chap 1 - Overview. What is an OS? 28/10/2014. Introduction

Thomas Fahrig Senior Developer Hypervisor Team. Hypervisor Architecture Terminology Goals Basics Details

Power Management in the Linux Kernel

Main Points. Scheduling policy: what to do next, when there are multiple threads ready to run. Definitions. Uniprocessor policies

Distributed Systems. REK s adaptation of Prof. Claypool s adaptation of Tanenbaum s Distributed Systems Chapter 1

An Enhanced CPU Scheduler for XEN Hypervisor to Improve Performance in Virtualized Environment

How To Understand And Understand An Operating System In C Programming

Road Map. Scheduling. Types of Scheduling. Scheduling. CPU Scheduling. Job Scheduling. Dickinson College Computer Science 354 Spring 2010.

3 - Introduction to Operating Systems

Principles and characteristics of distributed systems and environments

Completely Fair Scheduler and its tuning 1

Operatin g Systems: Internals and Design Principle s. Chapter 10 Multiprocessor and Real-Time Scheduling Seventh Edition By William Stallings

Announcements. Basic Concepts. Histogram of Typical CPU- Burst Times. Dispatcher. CPU Scheduler. Burst Cycle. Reading

Hardware accelerated Virtualization in the ARM Cortex Processors

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

Achieving Nanosecond Latency Between Applications with IPC Shared Memory Messaging

Processor Scheduling. Queues Recall OS maintains various queues

Konzepte von Betriebssystem-Komponenten. Linux Scheduler. Valderine Kom Kenmegne Proseminar KVBK Linux Scheduler Valderine Kom

Lecture 23: Multiprocessors

Chapter 1: Introduction. What is an Operating System?

Scheduling Task Parallelism" on Multi-Socket Multicore Systems"

CPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS

Asymmetric Scheduling and Load Balancing for Real-Time on Linux SMP

OPERATING SYSTEMS SCHEDULING

Which ARM Cortex Core Is Right for Your Application: A, R or M?

Java Environment for Parallel Realtime Development Platform Independent Software Development for Multicore Systems

/ Operating Systems I. Process Scheduling. Warren R. Carithers Rob Duncan

SAP HANA SPS 09 - What s New? SAP HANA Scalability

Parallel Programming Survey

Real- Time Mul,- Core Virtual Machine Scheduling in Xen

Load-Balancing for Improving User Responsiveness on Multicore Embedded Systems

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Introduction to Cloud Computing

Process Scheduling CS 241. February 24, Copyright University of Illinois CS 241 Staff

Final Report. Cluster Scheduling. Submitted by: Priti Lohani

Hard Real-Time Linux

PikeOS: Multi-Core RTOS for IMA. Dr. Sergey Tverdyshev SYSGO AG , Moscow

Linux process scheduling

1. Comments on reviews a. Need to avoid just summarizing web page asks you for:

big.little Technology Moves Towards Fully Heterogeneous Global Task Scheduling Improving Energy Efficiency and Performance in Mobile Devices

Embedded Parallel Computing

Operating System: Scheduling

Transcription:

EECS 750: Advanced Operating Systems 01/28 /2015 Heechul Yun 1

Recap: Completely Fair Scheduler(CFS) Each task maintains its virtual time V i = E i 1 w i, where E is executed time, w is a weight Pick the task with the smallest virtual time Tasks are sorted according to their virtual times Managed by a red-black tree, O(log N) Guarantee fairness and bounded latency No complex heuristics for interactivity. 2

Recap: BVT Key ideas Weighted fair sharing using virtual time Linux CFS Prioritizing real-time tasks by borrowing future virtual time (warpback mechanism) Project idea Extending Linux CFS to include BVT s warpback mechanism https://gist.github.com/leverich/5913713 3

Today Topic: Multicore CPU scheduling Linux CPU scheduling SMP, load balancing Efficient and scalable multiprocessor fair scheduling using distributed weighted round-robin, PPoPP '09 4

Symmetric Multiprocessing (SMP) Linux CPU1 CPU2 CPU3 CPU4 Memory All CPUs are equal Memory is shared A single OS, a task can run on any CPU 5

Asymmetric Multiprocessing (AMP) CPU1 CPU2 CPU3 CPU4 Linux Windows RTOS A RTOS B Memory Linux Windows RTOS A RTOS B All CPUs are NOT equal Memory is NOT shared Multiple OSes, A task can NOT run on any CPU 6

Uniform Memory Access (UMA) CPU1 CPU2 CPU3 CPU4 Memory All CPUs have the same memory access cost 7

Non-Uniform Memory Access (NUMA) CPU1 CPU2 CPU3 CPU4 Memory Memory All CPUs still can access the entire memory space But, the access cost is different depending on the access location 8

Global Scheduling tasks OS RunQueue HW CPU1 CPU2 CPU3 CPU4 9

Partitioned Scheduling tasks tasks tasks tasks OS RunQueue RunQueue RunQueue RunQueue HW CPU1 CPU2 CPU3 CPU4 Linux s basic design. Why? 10

Load balancing Goal Don t let someone do nothing while others are busy working Equally distribute loads to all CPUs 11

Load Balancing in Linux Move tasks to equalize loads of all cores When to check? Task fork, clone, exec, wake up A runqueue becomes empty Periodically When to balance? When the imbalance is high enough 12

Load Balancing in Linux: Example busy idle OS RunQueue RunQueue HW CPU1 CPU2 13

Load Balancing in Linux: Example busy idle OS RunQueue RunQueue HW CPU1 CPU2 14

Load Balancing in Linux: Example 2 busy idle T 1 T 2 T 3 OS RunQueue RunQueue HW CPU1 CPU2 What will happen? 15

Load Balancing in Linux: Example 2 Not globally fair 16

Load Balancing in Linux Further complications SMT (hyper threading) Shared cache vs. private cache NUMA Linux defines high enough imbalance differently on a case-by-case basis 17

Today s Paper Efficient and scalable multiprocessor fair scheduling using distributed weighted roundrobin, PPoPP '09 Guarantees global fairness 18

Distributed Weighted Round Robin Goal: guarantees task-level global fairness Local fairness Fair between the tasks on a single cpu Global fairness Fair between the all tasks on all CPUs CFS: no, DWRR=yes 19

Distributed Weighted Round Robin Algorithm For each round, each task can execute w * B time w: weight, B: round time unit Once a task consumes its round slice (w*b), it is pushed to the expired queue Once all tasks in a core are in the expired queue, pull tasks from other busy cores If there s no busy cores in the current round, then move to next round (highest round) 20

Distributed Weighted Round Robin 21

Comparison 22

Migration Cost Shared cache vs. private cache 23

Summary Multicore scheduling and load balancing in Linux Linux doesn t guarantee global fairness DWRR guarantees global fairness 24

Discussion Is migration cost really negligible? Does it really matter to guarantee CPU time fairness? Load balancing in heterogeneous multicore core processors? Big cores + small cores: e.g., ARM s biglittle 25

Project Grouping 26

Appendix 27

Load Balancing in Linux Slide source: Gap-Joo Na, Task Scheduling for Multicore Embedded Devices, ELC 2013 28

Load Balancing in Linux Scheduling domains SMT domain Logical cores that share ALUs (hyperthreads) MC domain Physical cores that share cache CPU domain Processors (packages) that share memory (UMA) NUMA domain 29