Asymptotic Analysis of Real-Time Queues

Similar documents
Modeling Heterogeneous User. Churn and Local Resilience of Unstructured P2P Networks

Lecture Note #4: Task Scheduling (1) EECS 571 Principles of Real-Time Embedded Systems. Kang G. Shin EECS Department University of Michigan

OPERATING SYSTEMS. Systems and Models. CS 3502 Spring Chapter 03

Priority-Driven Scheduling of Periodic Tasks. Why Focus on Uniprocessor Scheduling?

Lab: Response Time Analysis using FpsCalc Course: Real-Time Systems Period: Autumn 2015

Mwave/OS: A Predictable Real-time DSP Operating System

Real-Time Systems. Modeling Real-Time Systems

Real-Time and Embedded Systems (M) Lecture 4

Introduction to Real-Time Systems. Note: Slides are adopted from Lui Sha and Marco Caccamo

Co-scheduling Real-time Tasks and Non Real-time Tasks Using Empirical Probability Distribution of Execution Time Requirements.

Clock-Driven Scheduling

GENERALIZED TASK SCHEDULER

ENGG4420 CHAPTER 4 LECTURE 3 GENERALIZED TASK SCHEDULER

INTRODUCTION AND CLASSIFICATION OF QUEUES 16.1 Introduction

Dual Priority Scheduling: A Means of Providing Flexibility in Hard Real-time Systems.

ELC 4438: Embedded System Design Real-Time Scheduling

Q1. What is Real time system? Explain the basic model of Real time system. (8)

Dynamic Control of a Make-to-Order, Parallel-Server System with Cancellations

Scheduling theory, part 1

Real Time Scheduling. Real Time Scheduling. Real-Time Scheduling. Scheduling

CS510 Operating System Foundations. Jonathan Walpole

Lecture 11: Scheduling

Reference model of real-time systems

Clock-Driven Scheduling

Real-Time Scheduling Theory and Ada

CPU scheduling. CPU Scheduling

Pricing in Dynamic Advance Reservation Games

Efficiency of Dynamic Pricing in Priority-based Contents Delivery Networks

Adaptive Total Bandwidth Server: Using Predictive Execution Time

COMPUTATIONAL ANALYSIS OF A MULTI-SERVER BULK ARRIVAL WITH TWO MODES SERVER BREAKDOWN

CS 143A - Principles of Operating Systems

CPU SCHEDULING. Scheduling Objectives. Outline. Basic Concepts. Enforcement of fairness in allocating resources to processes

Mathematical Modeling and Analysis of Finite Queueing System with Unreliable Single Server

Project 2 solution code

Optimizing Capacity Utilization in Queuing Systems: Parallels with the EOQ Model

A Modeling Tool to Minimize the Expected Waiting Time of Call Center s Customers with Optimized Utilization of Resources

Hamdy A. Taha, OPERATIONS RESEARCH, AN INTRODUCTION, 5 th edition, Maxwell Macmillan International, 1992

Preemptive Scheduling of Multi-Criticality Systems with Varying Degrees of Execution Time Assurance

2. Scheduling issues. Common approaches /2. Common approaches /1. Common approaches / /18 UniPD - T. Vardanega 14/03/2018

Increasing Wireless Revenue with Service Differentiation

REAL-TIME DELAY ESTIMATION IN CALL CENTERS

CPU Scheduling (Chapters 7-11)

Job shop flow time prediction using neural networks

Preference-Oriented Fixed-Priority Scheduling for Real-Time Systems

Process Scheduling I. COMS W4118 Prof. Kaustubh R. Joshi hdp://

Usage-sensitive Pricing in Multi-service Networks

Technical Report CMU/SEI-89-TR-14 ESD-TR-89-; 022. Carnegie-Mellon University. Software Engineering Institute. Real-Time Scheduling Theory

Energy-Efficient Scheduling of Interactive Services on Heterogeneous Multicore Processors

Analysis of Process Models: Introduction, state space analysis and simulation in CPN Tools. prof.dr.ir. Wil van der Aalst

3. Scheduling issues. Common approaches /2. Common approaches /1. Common approaches / /17 UniPD / T. Vardanega 06/03/2017

LOAD SHARING IN HETEROGENEOUS DISTRIBUTED SYSTEMS

Application of queuing theory in construction industry

Examining and Modeling Customer Service Centers with Impatient Customers

Lecture 6: Scheduling. Michael O Boyle Embedded Software

PERFORMANCE EVALUATION OF DEPENDENT TWO-STAGE SERVICES

Course Outline. Embedded Real Time Operating System Chin Fu Kuo National University of Kaohsiung 2009 Fall

Algoritmi Distribuiti e Reti Complesse (modulo II) Luciano Gualà

An Adaptive Pricing Scheme for Content Delivery Systems

Algoritmi Distribuiti e Reti Complesse (modulo II) Luciano Gualà

Factory Operations Research Center (FORCe II)

Chapter 13. Waiting Lines and Queuing Theory Models

An Adaptive Threshold-Based Policy for Sharing Servers with Affinities

Motivating Examples of the Power of Analytical Modeling

Chapter 6: CPU Scheduling. Basic Concepts. Histogram of CPU-burst Times. CPU Scheduler. Dispatcher. Alternating Sequence of CPU And I/O Bursts

Lecture 3. Questions? Friday, January 14 CS 470 Operating Systems - Lecture 3 1

An-Najah National University Faculty of Engineering Industrial Engineering Department. System Dynamics. Instructor: Eng.

CHAPTER 4 CONTENT October :10 PM

Energy Efficient Fixed-Priority Scheduling for Real-Time Systems on Variable Voltage Processors

Queuing Theory. Carles Sitompul

Textbook: pp Chapter 12: Waiting Lines and Queuing Theory Models

Introduction - Simulation. Simulation of industrial processes and logistical systems - MION40

Business Process Management - Quantitative

On Optimal Tiered Structures for Network Service Bundles

Mode Change Protocols for Priority-Driven Preemptive Scheduling

Equilibrium customers choice between FCFS and Random servers

Prof. John W. Sutherland. March 20, Lecture #25. Service Processes & Systems Dept. of Mechanical Engineering - Engineering Mechanics

On Distribution Asset Management: Development of Replacement Strategies

Design and Implementation of LST Based Dynamic Scheduler on Real Time OS

A Residual Time Based Scheduling: Performance Modeling in M/G/C Queueing Applications*

SIMULATION OF MACHINE INTERFERENCE IN RANDOMLY CHANGING ENVIRONMENTS J. SZTRIK O. MŒLLER

Reliable Mode Changes in Real-Time Systems with Fixed Priority or EDF Scheduling

APPENDIX 1 Processing time (pij) Release date (rj) Due date (dj): Weight (wj)

Queuing Models. Queue. System

Mechanism Design and Computationally-Limited Agents. Kate Larson Computer Science Department Carnegie Mellon University

Analysis of Round-Robin Variants: Favoring Newly Arrived Jobs

Staffing of Time-Varying Queues To Achieve Time-Stable Performance

The Queueing Theory. Chulwon Kim. November 8, is a concept that has driven the establishments throughout our history in an orderly fashion.

Optimizing appointment driven systems via IPA

Recall: Example of RR with Time Quantum = 20. Round-Robin Discussion

CPU Scheduling. Chapter 9

Simulating Queuing Models in SAS

Learning Based Admission Control. Jaideep Dhok MS by Research (CSE) Search and Information Extraction Lab IIIT Hyderabad

DEADLINE MONOTONIC ALGORITHM (DMA)

Scheduling I. Today. Next Time. ! Introduction to scheduling! Classical algorithms. ! Advanced topics on scheduling

An Optimal Service Ordering for a World Wide Web Server

Rate Monotonic Analysis

Real time scheduling for embedded systems

WEB SERVICES COMPOSING BY MULTIAGENT NEGOTIATION

BUSSINES SIMULATING PROCES FOR THE PRODUCTION SURROUND, USING QUEUEING SYSTEM SIMULATION WITH WINQSB

Queuing Theory: A Case Study to Improve the Quality Services of a Restaurant

Transcription:

Asymptotic Analysis of John Lehoczky Department of Statistics Carnegie Mellon University Pittsburgh, PA 15213 Co-authors: Steve Shreve, Kavita Ramanan, Lukasz Kruk, Bogdan Doytchinov, Calvin Yeung, and Jeffery Hansen. June 1, 2015 Shreve Conference 1

Outline Thoughts about Steve Shreve Background on real-time queues Real-Time Queueing Theory Extensions June 1, 2015 Shreve Conference 2

Thoughts about Steve Shreve It has been my great good fortune to have Steve Shreve as a colleague for 35 years. He is: A distinguished mathematician and a wonderful research collaborator An outstanding teacher-educator A great colleague and resource who is willing to engage on others problems A devoted advisor and mentor Attains the highest standards of integrity and ethics. June 1, 2015 Shreve Conference 3

Background: 1 Traditional queueing theory focuses on: Stability of the system The efficiency of the use of the service facility (e.g. the fraction of time it is busy) and The experience of the customers (e.g. their waiting time or the length of the queue they join). There is a special category of queueing systems called real-time queues. Here, the tasks requiring service have deadlines by which the service must be completed. These systems have special performance metrics that focus on the fraction of tasks whose deadline was met. June 1, 2015 Shreve Conference 4

Background: 2 When tasks have deadlines and they must share a processing resource, then traditional queueing disciplines like FIFO or processor sharing should not be used since they pay no attention to deadlines. Deadline-sensitive scheduling policies like earliest deadline first must be used. There are a number of examples of real-time systems in which tasks have timing requirements. They especially occur in fairly autonomous systems with weight and power constraints, e.g. Mars rover, GPS satellites, autonomous aircraft, submarines, etc. in which one needs to minimize the number of computer systems on board and use them as efficiently as possible. June 1, 2015 Shreve Conference 5

Background: 3 The first widely recognized work on such systems was a 1973 paper by Lui and Layland in the JACM, written when C.L. Liu was a summer student at the Jet Propulsion Lab (JPL). In this work, a single computer was used to process a set of periodic tasks (to model worst case conditions). The question was to characterize the set of tasks that could be processed with no deadline being missed over [0, ). Formalizing this: assume there are n periodic tasks, each with a worst case computation time, C i, a period, T i, a (relative) deadline D i and an initial arrival time, I i. Thus, jobs from such a task would arrive at I i,i i + T i,i i + 2T i, etc. All C i units of work arriving at I i + kt i must be completed by I i + (k + 1)I i. June 1, 2015 Shreve Conference 6

Background: 4 LL considered two broad classes of scheduling policies (queue disciplines): fixed priority and dynamic priority. Under fixed priority, each of the n tasks would be assigned a unique priority, and anytime a higher priority task arrived while a lower priority task was being processed, the higher priority task would preempt (at no cost in time). LL asked the question: for all values of n, {(I i,c i,t i ),1 i n}, what is the optimal scheduling policy (among fixed or dynamic classes), and given the optimal policy, how can it be determined whether or not a scheduling policy can satisfy the deadline requirements for all tasks over [0, ). June 1, 2015 Shreve Conference 7

Background: 5 For fixed priority scheduling algorithms of periodic tasks, LL proved: The optimal scheduling algorithm is the rate monotonic scheduling algorithm. For this algorithm, if T i < T j, then task i is given higher priority than task j, independent of C i,c j The worst case phasing is the Critical Instant, that is I j = 0, 1 j n. If U = U 1 +... + U n < n(2 1/n 1), then all deadlines will be met (we say the task set is schedulable). lim n n(2 1/n 1) = log(2) =.693. June 1, 2015 Shreve Conference 8

Background: 6 For dynamic scheduling algorithms, LL proved that earliest deadline first was optimal. Other scheduling algorithms also can be used successfully (e.g. least slack first). LL proved that any task set for which U = U 1 +... + U n 1 will guarantee that all task deadlines can be met using the earliest deadline first algorithm. June 1, 2015 Shreve Conference 9

Background: 7 These results for the periodic task set case with hard deadlines has been greatly generalized and includes such factors as: Deadlines different from periods Context switching times Precedence constraints among tasks Task synchronization (i.e. some tasks need special resources like a communication bus and cannot be interrupted while using that resources by another task needing that resource, even if it has higher priority). June 1, 2015 Shreve Conference 10

Background: 8 For all deadlines to be met, LL assumed a deterministic environment, e.g. worst case execution times and interarrival times, and sufficiently long deadlines. There are applications that exhibit substantial variability either in terms of resource requirements or arrival times or both. In such applications, the worst case utilization (considering the minimum interarrival time and the maximum computation time) can be much larger than the average case utilization. June 1, 2015 Shreve Conference 11

Background: 9 Deadlines can be guaranteed, but the effective resource utilization can be very low, especially if there is a large difference between the worst-case utilization and the average-case utilization. Moreover, hard deadlines may be an unnecessarily restrictive constraint on the system. Many applications can miss some deadlines and still meet user requirements, provided that the missed deadlines do not occur over a short period of time, resulting in a blackout of service. June 1, 2015 Shreve Conference 12

Video-Conference Bandwidth Usage kbps 0 1000 2000 3000 4000 Quiet Active Camera Motion June 1, 2015 Shreve Conference 13

Video-Conference Bandwidth Usage 0.0 0.0005 0.0010 0.0015 0 1000 2000 3000 4000 kbps June 1, 2015 Shreve Conference 14

The Dilemma We want to create a theory that: permits the stochastic behavior associated with queueing models, takes individual task timing requirements into account. Such models will have so much detail that they will be unworkable analytically, and we will be back to simulation. Fortunately, some ideas in heavy traffic queueing theory can help, since timing requirements will be met in light-moderate traffic. June 1, 2015 Shreve Conference 15

M/M/1 Queue, ρ =.6, 5000 Events 15 M/M/1 Queue with rho =.6, 5000 events 10 Queue Length 5 0 0 500 1000 1500 2000 2500 3000 3500 4000 4500 Time June 1, 2015 Shreve Conference 16

M/M/1 Queue, ρ =.95, 5000 Events 60 M/M/1 Queue with rho =.95, 5000 events 50 40 Queue Length 30 20 10 0 0 500 1000 1500 2000 2500 3000 Time June 1, 2015 Shreve Conference 17

Heavy Traffic Limit The GI/G/1 queueing system, in heavy traffic (ρ = 1 γ n ), with time scaled by n and space scaled by n both the queue length and the workload processes converge as n to a Drifted, Reflected Brownian motion. The parameters of this process depend only upon the mean and variance of the arrival and service processes. The drift is γ and the variance (Peterson) K k=1 λ k m 2 k (C2 A k + CS 2 k ). This theory extends to the network case. June 1, 2015 Shreve Conference 18

Real-Time Queueing Theory - RTQT Heavy traffic queueing theory offers a method to determine standard queueing performance measures using only moment assumptions concerning the basic arrival and service processes. But, what does this have to do with real-time systems in which we need to determine the ability of the system to meet task timing requirements? We need to introduce a dynamic variable for each task in the system, its lead-time = time until deadline. This becomes a high-dimensional system, but perhaps it simplifies in heavy-traffic. June 1, 2015 Shreve Conference 19

Lead-Time Measures 0 1 2 3 4 t=0 0 1 2 3 4 t=1 0 1 2 3 4 t=2 June 1, 2015 Shreve Conference 20

Workload Measures 0 1 2 3 4 t=0 0 1 2 3 4 0 1 2 3 4 t=1 t=2 June 1, 2015 Shreve Conference 21

Real-Time Queueing: Assumptions For the one flow, one node case: Renewal process arrivals, (F a, 1 λ,σ a). Independent service times, (F s, 1 µ,σ s). Tasks have independent random deadlines with cdf G. Arrivals, services, deadlines are independent. Let ρ = λ µ, θ = 2(1 ρ)µ/(ρ(c2 a + Cs)) 2 June 1, 2015 Shreve Conference 22

Real-Time Queueing: The Ideas 1 If there are Q(t) tasks in the queue at time t, then the lead-time vector is (L 1 (t),...,l Q(t) (t)) which changes with time. A simple RT queueing system has state {(Q(t),(L 1 (t),...,l Q(t) (t))),t 0}. Such a high dimensional process is difficult to analyze, even in simple circumstances. We study these models in heavy traffic (traffic intensity near 1). The key idea is to separate into two components: {Q(t),t 0} and {(L 1,...,L Q(t) ),t 0} given {Q(t),t 0}. June 1, 2015 Shreve Conference 23

Real-Time Queueing: The Ideas 2 In heavy traffic (λ (n) = λ(1 γ n ), µ (n) = λ, ρ (n) = 1 γ n ), the scaled queue length, { Q(nt) n,t 0} and the scaled workload, { W(nt) n,t 0}, converge to drifted, reflected Brownian motion processes. the lead-time profile converge to deterministic function of the queue length (or the workload) The deterministic function depends upon: The initial task deadline probability distribution. The scheduling policy. June 1, 2015 Shreve Conference 24

Real-Time Queueing: The Ideas 3 Using the deterministic approximation, each queue length (or workload value) has an associate a lead-time profile. Lateness occurs when the left edge of the profile reaches 0. The left edge of the profile reaches 0 at a computable queue length (or workload value). Thus, the event of task lateness is associated with the queue length (or workload) being longer than a certain critical value. So we can express the probability of lateness (and other performance measures) in terms of the queue length (or workload) distribution, which can be computed from Brownian motion facts. June 1, 2015 Shreve Conference 25

VRTQT Demonstration Developed by Jeffery Hansen of the CMU Software Engineering Institute June 1, 2015 Shreve Conference 26

Processor Sharing: Exp. Deadlines June 1, 2015 Shreve Conference 27

Processor Sharing: Exp. Deadlines June 1, 2015 Shreve Conference 28

Processor Sharing: Exp. Deadlines June 1, 2015 Shreve Conference 29

Processor Sharing: Exp. Deadlines June 1, 2015 Shreve Conference 30

Heavy Traffic Analysis: 1 Queue length process, Q (n) (t), Workload process, W (n) (t), Lead-time measure, Q (n) (t)(b), Number of customers in queue at t having lead-times in B at t. Workload measure, W (n) (t)(b), Work at t from customers in queue having lead-times in B at t. Frontier, F(t) largest lead-time of any customer ever in service. June 1, 2015 Shreve Conference 31

Heavy Traffic Analysis: 2 Ŵ (n) (t) = W(n) (nt) n W, a reflected Brownian motion with drift γ. ˆQ (n) (t) = Q(n) (nt) n µw, Limiting scaled frontier process, F (t) = H 1 (W (t)) where H(y) = y (1 G(u))du. June 1, 2015 Shreve Conference 32

Heavy Traffic Analysis: 3 Ŵ (t)(b) = B [F (t), )(1 G(u))du. ˆQ (t)(b) = µŵ (t)(b). Then Ŵ(n) Ŵ. ˆQ (n) ˆQ. June 1, 2015 Shreve Conference 33

Task Lead-Time Profile: EDF For M/M/1 (and GI/G/1) queueing systems using the EDF scheduling algorithm, the instantaneous lead-time profile, given in the form of a p.d.f. is f(x) = (1 G(x)) W(t),F(t) x < where G is the c.d.f. of the task deadline distribution, W(t) is the current queue length and F(t) is the frontier, where W(t) = F(t) (1 G(x))dx. June 1, 2015 Shreve Conference 34

Calculating Lateness: 1 The workload process behaves like a drifted, reflected Brownian motion. Hence it has an exponential(θ) equilibrium distribution, where θ involves the first two moments of the interarrival and service distribution. Recall that we determine the frontier, F(t), through the equation: W(t) = F(t) (1 G(x))dx. June 1, 2015 Shreve Conference 35

Calculating Lateness: 2 Lateness is associated with F(t) 0, or equivalently W(t) 0 (1 G(x))dx = E(D). Consequently, P(Lateness) = P(W(t) E(D)) = e θe(d), or log(p(lateness)) = θe(d). June 1, 2015 Shreve Conference 36

EDF Lateness Probabilities Fraction Late (φ) 1.000 Exponential Uniform Internet-Like 0.100 0.010 0.001 0 20 40 60 80 100 120 140 160 Mean Deadline (d avg ) June 1, 2015 Shreve Conference 37

Extensions Determining the accuracy of the approximations Allowing customer reneging or if a customer is going to be late and counted as a deadline miss, then it is best to never serve it at all Feed-forward queueing networks Acyclic queueing networks June 1, 2015 Shreve Conference 38