1 Server Scheduling in the L p norm Nikhil Bansal (CMU) Kirk Pruhs (Univ. of Pittsburgh)

Slides:



Advertisements
Similar presentations
Scheduling Criteria CPU utilization – keep the CPU as busy as possible (from 0% to 100%) Throughput – # of processes that complete their execution per.
Advertisements

S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced.
Operating Systems Chapter 6
Chap 5 Process Scheduling. Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU–I/O Burst Cycle – Process execution consists of a.
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.
CPU Scheduling CS 3100 CPU Scheduling1. Objectives To introduce CPU scheduling, which is the basis for multiprogrammed operating systems To describe various.
CPU Scheduling Algorithms
Chapter 3: CPU Scheduling
Operating Systems 1 K. Salah Module 2.1: CPU Scheduling Scheduling Types Scheduling Criteria Scheduling Algorithms Performance Evaluation.
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.
1 Scheduling on Heterogeneous Machines: Minimize Total Energy + Flowtime Ravishankar Krishnaswamy Carnegie Mellon University Joint work with Anupam Gupta.
Chapter 5-CPU Scheduling
Minimizing Flow Time on Multiple Machines Nikhil Bansal IBM Research, T.J. Watson.
Efficient Scheduling of Heterogeneous Continuous Queries Mohamed A. Sharaf Panos K. Chrysanthis Alexandros Labrinidis Kirk Pruhs Advanced Data Management.
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 – 7 th Edition, Feb 2, 2005 Basic Concepts Maximum CPU utilization.
Chapter 6: CPU Scheduling
CS212: OPERATING SYSTEM Lecture 3: Process Scheduling 1.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
1 Pruhs, Woeginger, Uthaisombut 2004  Qos Objective: Minimize total flow time  Flow time f i of a job i is completion time C i – r i  Power Objective:
CS 3150 Presentation 1 Ihsan Ayyub Qazi “Achievable sojourn times in M/M/1 and GI/GI/1 systems: A Comparison between SRPT and Blind Policies” A(t), Q(t)Q(t)
Scheduling. Alternating Sequence of CPU And I/O Bursts.
A Maiden Analysis of Longest Wait First Jeff Edmonds York University Kirk Pruhs University of Pittsburgh.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
Alternating Sequence of CPU And I/O Bursts. Histogram of CPU-burst Times.
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.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 2, 2005 Chapter 5: CPU Scheduling Basic.
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.
Multicast Pull Scheduling Kirk Pruhs. The Big Problem Movie Distribution Database Replication via Internet Harry Potter Book Download Software Download.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Scheduling Parallel DAG Jobs to Minimize the Average Flow Time K. Agrawal, J. Li, K. Lu, B. Moseley.
Lecture 4 CPU scheduling. Basic Concepts Single Process  one process at a time Maximum CPU utilization obtained with multiprogramming CPU idle :waiting.
CPU Scheduling G.Anuradha Reference : Galvin. CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time.
CPU scheduling.  Single Process  one process at a time  Maximum CPU utilization obtained with multiprogramming  CPU idle :waiting time is wasted 2.
1 Module 5: Scheduling CPU Scheduling Scheduling Algorithms Reading: Chapter
Basic Concepts Maximum CPU utilization obtained with multiprogramming
1 Lecture 5: CPU Scheduling Operating System Fall 2006.
CPU Scheduling Algorithms CSSE 332 Operating Systems Rose-Hulman Institute of Technology.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
1 Chapter 5: CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Chapter 5a: CPU Scheduling
Chapter 6: CPU Scheduling
CPU Scheduling Basic Concepts Scheduling Criteria
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
Operating System Concepts
Chapter5: CPU Scheduling
COT 4600 Operating Systems Spring 2011
Chapter 6: CPU Scheduling
Chapter 5: CPU Scheduling
University of Pittsburgh
University of Pittsburgh
Process Scheduling B.Ramamurthy 4/11/2019.
Process Scheduling B.Ramamurthy 4/7/2019.
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
CPU Scheduling: Basic Concepts
Presentation transcript:

1 Server Scheduling in the L p norm Nikhil Bansal (CMU) Kirk Pruhs (Univ. of Pittsburgh)

2 Scheduling Provide service such that users are satisfied

3 Motivation Single Machine Arbitrary arrival or release time ( r j ) Arbitrary processing requirement or size ( p j ) t=0 (r 1 ) r2r2 r3r3

4 Motivation t=0 (r 1 ) r2r2 r3r3 c2c2 c3c3 c1c1 Job 1 preempted Single Machine Arbitrary arrival or release time ( r j ) Arbitrary processing requirement or size ( p j )

5 Flow Time t=0 (r 1 ) r2r2 r3r3 c2c2 c3c3 c1c1 Completion time: c j Flow time: f j = c j -r j (time user waits) Flow Time of Job 1

6 Flow Time t=0 (r 1 ) r2r2 r3r3 c2c2 c3c3 c1c1 Completion time: c j Flow time: f j = c j -r j (time user waits) Flow Time of Job 3

7 Stretch Stretch (i) = Flow time (i) / Size (i) [Bender Chakrabarti Muthukrishnan’98] Jobs willing to tolerate flow time proportional to size Also known as normalized flow time Each job contributes equally

8 Known Results Minimize total flow time (  i f i ) [L 1 norm] Optimal Online algorithm: Work on job with smallest remaining proc. time (SRPT) SRPT is 2 – competitive for total stretch [ Gehrke, Muthukrishnan, Rajaraman, Shaheen’99 ] Concern: Big jobs could be stuck! Starvation! Another end: Minimize maximum flow time [L 1 norm] First Come First Served (FCFS) is optimal But bad average performance [Smalls stuck behind big]

9 Balancing average and maximum L p norms: Penalize outliers, good average performance Online algorithms for minimizing 1) Flow time (i.e. (  j f j p ) 1/p ) 2) Stretch (i.e. (  j s j p ) 1/p ) L p norms, previously studied: Load balancing [ Awerbuch Azar Grove+ ’95, Alon Azar Woeginger Yadid ’97, Avidor Azar Sgall ’01 ] Completion time scheduling [ Epstein,Sgall’99 ]

10 Lower Bound L 3 jobs of size 1 By time L 3, If do not finish size L job, bad! Size L Online: Cost of big (L 3 ) 2 = L 6 Opt: L 3 Smalls delayed by L= O(L 5 ) No n o(1) competitive randomized alg for L p norms of flow time and stretch, for 1<p< 1 SRPT, FCFS optimal algorithms for p=1, 1 Suppose p=2

11 Lower Bound No n o(1) competitive randomized alg for L p norms of flow time and stretch, for 1<p< 1 SRPT, FCFS optimal algorithms for p=1, 1 L 3 jobs of size 1 By time L 3, If do not finish size L job, bad! L 5 jobs of size 1/L 2 Optional Stream of jobs Size L

12 Results Thm: SRPT, SJF (Shortest Job First) are 1+  speed O(1/  ) competitive Resource Augmentation: [Kalyanasundaram, Pruhs 95] Online has more resources s-speed, c-competitive max I Online(I,s) / Opt(I,1) · c No starvation unless close to peak capacity

13 Interpreting Resource Augmentation Load Performance Optimal

14 Interpreting Resource Augmentation Load Performance Optimal Online

15 Proof Sketch L p norm of flow time as ‘weighted’ Flow Time problem Age(j,t) = 0 if t c j t-r j if r j < t < c j Observation: f j 2 /2 =  t age(j,t)  j f j 2 /2=  t  j: alive at time t age(j,t) Proof idea: Show, at all times total age of alive jobs < O(1/  ) ¢ total age under Opt

16 Proof Idea If job J of size x delayed for t units under SJF Then either, 1) Had lot of work of size < x before arrival of J 2) Lot of work arriving continuously since J arrived. In either case, Opt can be shown to have sufficiently many “old’’ unfinished jobs,

17 Non-Clairvoyant Scheduling Non-Clairvoyant Model [ Motwani Phillips Torng ’94 ] Scheduler does not know size of a job Learns size only when job finishes. Cannot do things like Shortest Job First, SRPT What can we do? FCFS, Round Robin (time-sharing), …

18 Measuring Performance Resource Augmentation: s-speed, c-competitive Online non-clairvoyant (s,I) Opt offline clairvoyant (1,I) · cMax I

19 The Algorithm (MLF) Multi-Level Feedback (MLF): Used in Windows NT, Unix Levels L 0,L 1,L 2,… job enters L 0 first In L i, receive 2 i amount of work, then promoted to L i+1 Work on level i, iff no job in level 0.. i-1 L0L0 L1L1 L2L2

20 Previous Results (Non-Clairvoyant) L 1 norm of Flow Time: MLF: 1+  speed, O(1/  ) competitive [ Kalyanasundaram, Pruhs ’95 ] L 1 norm of Stretch: MLF: 1+  speed, O(1/  4 log 2 B) competitive [ B., Dhamdhere, Konemann, Sinha’ 03 ] Any algorithm is 1+  speed  (log B/  ) competitive B = ratio of maximum to minimum job size

21 Our Results MLF is 1+  speed, O(1/  4 ) competitive for all norms of flow time MLF is 1+  speed, O(1/  4 log 2 B) competitive for all norms of stretch

22 Analysis Generic technique: reduce MLF to SJF (Shortest Job First) Reduces a non-clairvoyant problem into a clairvoyant one.

23 Final Result Round Robin: At any time, share processor equally Considered to be fair (each job treated equally) But not good according to the L p norm criteria Round Robin is not 1+  speed n o(1) competitive (for sufficiently small  )

24 Open Problems 1) Offline case totally open NP-Hard? Non-trivial approximation algorithms? 2) Multiple machines 3) Other notions to deal with tradeoff between average vs. max performance

25 Thank You!

26 An example Goal: Minimize  f i 2 (i.e. p=2) a job of size 1 arrives for n time units If n small ( < L 2 ), work on the small jobs If n big ( > L 2 ), at time L 2, shift to finish the big job ……… Good algorithm: A combination of SRPT + FCFS Size L

27 MLF

28 MLF

29 MLF

30 MLF

31 MLF

32 MLF

33 MLF

34 MLF

35 Connection between MLF and SJF Instance J : 2 i -1 Instance J’ : 1,2,4,…,2 i-1 J J’

36 MLF and SJF Instance J : 2 i -1 Instance J’ : 1,2,4,…,2 i-1

37 MLF and SJF Instance J : 2 i -1 Instance J’ : 1,2,4,…,2 i-1

38 MLF and SJF Instance J : 2 i -1 Instance J’ : 1,2,4,…,2 i-1

39 MLF and SJF MLF works on a job in level i  SJF works on 2 i size copy of same job MLF works on smallest level SJF works on smallest job

40 MLF and SJF MLF works on a job in level i  SJF works on 2 i size copy of same job MLF works on smallest level SJF works on smallest job

41 Analysis Idea 2 Main ideas: 1) MLF(J) can be viewed as SJF (J’) 2) We know that SJF(J’) ¼ Opt(J’), so MLF(J) ¼ Opt(J’) Opt(J) previous clairvoyant result Fairly general technique, usually allows us to reduce a non-clairvoyant problem into a clairvoyant one.