Multiprocessor Scheduling

Similar documents
Multiprocessor Scheduling. Multiprocessor Scheduling

Multiprocessor Scheduling. Multiprocessor Scheduling

Types of Virtualization. Types of virtualization

Lecture Topics. Announcements. Today: Uniprocessor Scheduling (Stallings, chapter ) Next: Advanced Scheduling (Stallings, chapter

Announcements. Program #1. Program #0. Reading. Is due at 9:00 AM on Thursday. Re-grade requests are due by Monday at 11:59:59 PM.

Multiple Processor Systems. Lecture 15 Multiple Processor Systems. Multiprocessor Hardware (1) Multiprocessors. Multiprocessor Hardware (2)

Example: CPU-bound process that would run for 100 quanta continuously 1, 2, 4, 8, 16, 32, 64 (only 37 required for last run) Needs only 7 swaps

Distributed Scheduling. Distributed Scheduling

CPU Scheduling: Objectives

CS370 Operating Systems

CS 326: Operating Systems. CPU Scheduling. Lecture 6

Announcements. Program #1. Reading. Due 2/15 at 5:00 pm. Finish scheduling Process Synchronization: Chapter 6 (8 th Ed) or Chapter 7 (6 th Ed)

1.1 CPU I/O Burst Cycle

Start of Lecture: February 10, Chapter 6: Scheduling

Today s class. Scheduling. Informationsteknologi. Tuesday, October 9, 2007 Computer Systems/Operating Systems - Class 14 1

Outline. Definition of a Distributed System Goals of a Distributed System Types of Distributed Systems

Multiprocessor and Real- Time Scheduling. Chapter 10

CSCI-GA Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke

Scheduling in the Supermarket

Uniprocessor Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Three level scheduling

Lecture 1: January 22

W4118: advanced scheduling

CS370 Operating Systems

CPU Scheduling. CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections )

Sprite (contd) Code and Process Migration

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

SMD149 - Operating Systems - Multiprocessing

Overview. SMD149 - Operating Systems - Multiprocessing. Multiprocessing architecture. Introduction SISD. Flynn s taxonomy

LECTURE 3:CPU SCHEDULING

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Properties of Processes

Motivation. Threads. Multithreaded Server Architecture. Thread of execution. Chapter 4

Distributed Operating Systems

Chapter 5 CPU scheduling

Scheduling. Jesus Labarta

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

Preview. Process Scheduler. Process Scheduling Algorithms for Batch System. Process Scheduling Algorithms for Interactive System

Scheduling of processes

Lecture 1: January 23

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)

Multiprocessor Systems. COMP s1

CPU Scheduling Algorithms

CPSC/ECE 3220 Summer 2018 Exam 2 No Electronics.

Processes and Threads. Processes: Review

CPU Scheduling. Operating Systems (Fall/Winter 2018) Yajin Zhou ( Zhejiang University

CS418 Operating Systems

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)

CPSC/ECE 3220 Summer 2017 Exam 2

CS140 Operating Systems and Systems Programming Midterm Exam

The Effect of Scheduling Discipline on Dynamic Load Sharing in Heterogeneous Distributed Systems

CS Computer Systems. Lecture 6: Process Scheduling

Course Syllabus. Operating Systems

Outline. Real Time Schedulers. Assumptions. Objective for today s lecture: Advanced topics in scheduling

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

Lecture Topics. Announcements. Today: Advanced Scheduling (Stallings, chapter ) Next: Deadlock (Stallings, chapter

COMP 3361: Operating Systems 1 Final Exam Winter 2009

8: Scheduling. Scheduling. Mark Handley

Last class: Today: CPU Scheduling. CPU Scheduling Algorithms and Systems

Parallel DBMS. Parallel Database Systems. PDBS vs Distributed DBS. Types of Parallelism. Goals and Metrics Speedup. Types of Parallelism

Operating Systems. Process scheduling. Thomas Ropars.

OVERVIEW. Last Week: But if frequency of high priority task increases temporarily, system may encounter overload: Today: Slide 1. Slide 3.

CSE 120 Principles of Operating Systems

Process Scheduling. Copyright : University of Illinois CS 241 Staff

Multiprocessor System. Multiprocessor Systems. Bus Based UMA. Types of Multiprocessors (MPs) Cache Consistency. Bus Based UMA. Chapter 8, 8.

1 Multiprocessors. 1.1 Kinds of Processes. COMP 242 Class Notes Section 9: Multiprocessor Operating Systems

CS370 Operating Systems Midterm Review

CS 318 Principles of Operating Systems

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

3. CPU Scheduling. Operating System Concepts with Java 8th Edition Silberschatz, Galvin and Gagn

Chapter 6: CPU Scheduling

Last Class: Processes

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Scheduling. Scheduling. Scheduling. Scheduling Criteria. Priorities. Scheduling

CPU Scheduling. Schedulers. CPSC 313: Intro to Computer Systems. Intro to Scheduling. Schedulers in the OS

Distributed Operating Systems Spring Prashant Shenoy UMass Computer Science.

Operating Systems. Scheduling

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

Tasks. Task Implementation and management

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski

Operating Systems. Lecture Process Scheduling. Golestan University. Hossein Momeni

Round Robin (RR) ACSC 271 Operating Systems. RR Example. RR Scheduling. Lecture 9: Scheduling Algorithms

1 Textbook scheduling. 2 Priority scheduling. 3 Advanced scheduling topics. - What goals should we have for a scheduling algorithm?

Announcements/Reminders

CSE 120 Principles of Operating Systems Spring 2017

Computer Systems Assignment 4: Scheduling and I/O

Parallel Computers. CPE 631 Session 20: Multiprocessors. Flynn s Tahonomy (1972) Why Multiprocessors?

Chapter 5: CPU Scheduling

Operating Systems, Fall Lecture 9, Tiina Niklander 1

QUESTION BANK UNIT I

Main Points of the Computer Organization and System Software Module

CSCI 4717 Computer Architecture

Multi-Level Feedback Queues

Lecture 2 Process Management

Chapter 5: Process Scheduling

Distributed Operating Systems Fall Prashant Shenoy UMass Computer Science. CS677: Distributed OS

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Scheduling

Multiprocessor and Real-Time Scheduling. Chapter 10

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System

Transcription:

Multiprocessor Scheduling Will consider only shared memory multiprocessor or multi-core CPU Salient features: One or more caches: cache affinity is important Semaphores/locks typically implemented as spin-locks: preemption during critical sections Multi-core systems: some caches shared (L2,L3); others are not Lecture 4, page 1

Multiprocessor Scheduling Central queue queue can be a bottleneck Distributed queue load balancing between queue Lecture 4, page 2

Multiprocessor Scheduling Common mechanisms combine central queue with per processor queue (SGI IRIX) Exploit cache affinity try to schedule on the same processor that a process/thread executed last Context switch overhead Quantum sizes larger on multiprocessors than uniprocessors Lecture 4, page 3

Parallel Applications on SMPs Gang scheduling: schedule parallel app at once Effect of spin-locks: what happens if preemption occurs in the middle of a critical section? Preempt entire application (co-scheduling) Raise priority so preemption does not occur (smart scheduling) Both of the above Provide applications with more control over its scheduling Users should not have to check if it is safe to make certain system calls If one thread blocks, others must be able to run Lecture 4, page 4

Distributed Scheduling: Motivation Distributed system with N workstations Model each w/s as identical, independent M/M/1 systems Utilization u, P(system idle)=1-u What is the probability that at least one system is idle and one job is waiting? Lecture 4, page 5

Implications Probability high for moderate system utilization Potential for performance improvement via load distribution High utilization => little benefit Low utilization => rarely job waiting Distributed scheduling (aka load balancing) potentially useful What is the performance metric? Mean response time What is the measure of load? Must be easy to measure Must reflect performance improvement Lecture 4, page 6

Design Issues Measure of load Queue lengths at CPU, CPU utilization Types of policies Static: decisions hardwired into system Dynamic: uses load information Adaptive: policy varies according to load Preemptive versus non-preemptive Centralized versus decentralized Stability: λ>µ => instability, λ 1 +λ 2 <µ 1 +µ 2 =>load balance Job floats around and load oscillates Lecture 4, page 7

Components Transfer policy: when to transfer a process? Threshold-based policies are common and easy Selection policy: which process to transfer? Prefer new processes Transfer cost should be small compared to execution cost Select processes with long execution times Location policy: where to transfer the process? Polling, random, nearest neighbor Information policy: when and from where? Demand driven [only if sender/receiver], time-driven [periodic], state-change-driven [send update if load changes] Lecture 4, page 8

Sender-initiated Policy Transfer policy Selection policy: newly arrived process Location policy: three variations Random: may generate lots of transfers => limit max transfers Threshold: probe n nodes sequentially Transfer to first node below threshold, if none, keep job Shortest: poll N p nodes in parallel Choose least loaded node below T Lecture 4, page 9

Receiver-initiated Policy Transfer policy: If departing process causes load < T, find a process from elsewhere Selection policy: newly arrived or partially executed process Location policy: Threshold: probe up to N p other nodes sequentially Transfer from first one above threshold, if none, do nothing Shortest: poll n nodes in parallel, choose node with heaviest load above T Lecture 4, page 10

Symmetric Policies Nodes act as both senders and receivers: combine previous two policies without change Use average load as threshold Improved symmetric policy: exploit polling information Two thresholds: LT, UT, LT <= UT Maintain sender, receiver and OK nodes using polling info Sender: poll first node on receiver list Receiver: poll first node on sender list Lecture 4, page 11

Case Study 1 : V-System (Stanford) State-change driven information policy Significant change in CPU/memory utilization is broadcast to all other nodes M least loaded nodes are receivers, others are senders Sender-initiated with new job selection policy Location policy: probe random receiver, if still receiver, transfer job, else try another Lecture 4, page 12

Case study 2: Sprite (Berkeley) Workstation environment => owner is king! Centralized information policy: coordinator keeps info State-change driven information policy Receiver: workstation with no keyboard/mouse activity for 30 seconds and # active processes < number of processors Selection policy: manually done by user => workstation becomes sender Location policy: sender queries coordinator WS with foreign process becomes sender if user becomes active: selection policy=> home workstation Lecture 4, page 13

Sprite (contd) Sprite process migration Facilitated by the Sprite file system State transfer Swap everything out Send page tables and file descriptors to receiver Demand page process in Only dependencies are communication-related Redirect communication from home WS to receiver Lecture 4, page 14

Case Study 3 : Volunteer Computing Internet scale operating system (ISOS) Harness compute cycles of thousands of PCs on the Internet PCs owned by different individuals Donate CPU cycles/storage when not in use (pool resouces) Contact coordinator for work Coordinator: partition large parallel app into small tasks Assign compute/storage tasks to PCs Examples: Seti@home, BOINC, P2P backups Volunteer computing Lecture 4, page 15

Distributed Scheduling Today Scheduling tasks in a cluster of servers Schedule batch jobs: Condor Schedule web requests in replicated servers Lecture 4, page 16

Case study 4 : Condor Condor: use idle cycles on workstations in a LAN Used to run large batch jobs, long simulations Idle machines contact condor for work Condor assigns a waiting job User returns to workstation => suspend job, migrate supports process migration Flexible job scheduling policies Sun Grid Engine: similar features as Condor Evolved into cluster batch schedulers (SGE, DQS ) SLURM scheduler on UMass Swarm cluster Lecture 4, page 17

Case study 5: Replicated Web Server Distributed scheduling in large web servers: N nodes, one node acts as load balancing switch other nodes are replicas Requests arrive at the load balancer queue Scheduled onto a replica Simple policies: least loaded, round robin Session-based versus request-based polices Will revisit this topic when studying WWW Lecture 4, page 18