This Item Is the Archived Peer-Reviewed Author-Version Of

Total Page:16

File Type:pdf, Size:1020Kb

This Item Is the Archived Peer-Reviewed Author-Version Of This item is the archived peer-reviewed author-version of: Analyzing queues with customer differentiation using matrix analytic methods Reference: van Velthoven Jeroen.- Analyzing queues with customer differentiation using matrix analytic methods Antwerpen, Universiteit Antwerpen. Faculteit Wetenschappen. Departement Wiskunde & Informatica, 2008, 179 p. Handle: http://hdl.handle.net/10067/1109350151162165141 Institutional repository IRUA Faculteit Wetenschappen Departement Wiskunde & Informatica Analyzing Queues with Customer Differentiation using Matrix Analytic Methods Een analyse van wachtrijsystemen met differentiatie in klanten gebruikmakend van matrix analytische methodes Proefschrift voorgelegd tot het behalen van de graad van doctor in de Wetenschappen aan de Universiteit Antwerpen, te verdedigen door Jeroen VAN VELTHOVEN Promotor: Prof. dr. Benny Van Houdt Copromotor: Prof. dr. Chris Blondia Antwerpen, 2008 Contents Preface xi Acknowledgements xiii Notations and Acronyms xv Summary and Organization xvii I Introduction1 1 Queueing Theory and Markov Chains3 1.1 Markov Chains...................................4 1.2 Queueing Theory..................................6 1.2.1 Arrival Process...............................6 1.2.2 Scheduling Discipline............................7 1.2.3 Service Process...............................8 1.2.4 Some Basic Queueing Systems......................9 1.2.5 Customer Differentiation..........................9 2 Matrix Analytic Methods 11 2.1 Structured Processes................................ 12 2.1.1 M/G/1 and GI/M/1 Type Markov Chains................ 12 2.1.2 Quasi-Birth-Death Markov Chains.................... 12 2.1.3 Tree-Like Processes............................. 14 2.2 The D-MAP/PH/1 Queue............................. 16 2.2.1 The Discrete-Time Markovian Arrival Process.............. 16 2.2.2 Phase-Type Service Time......................... 17 2.2.3 Modeling the D-MAP/PH/1 Queue................... 18 II Steady State Analysis 19 3 Impatient Customers 21 3.1 Related Work.................................... 22 3.2 General Customer Impatience in the D-MAP/PH/1 Queue.......... 22 3.2.1 The Discrete-Time D-MAP/PH/1+GI Queue.............. 23 i Contents 3.2.2 Impatient Customers in the System................... 24 3.2.3 Service Time Aware Impatient Customers................ 28 3.2.4 Impatient Customers in the Waiting Room............... 30 3.2.5 Quasi-Birth-Death Reduction....................... 33 3.2.6 Numerical Examples............................ 37 3.3 Minimizing the Abandonment Probability.................... 40 3.3.1 The Geo/Geo/1 Queue with a Limited Sojourn Time......... 40 3.3.2 The Geo/Geo/1 Queue with a Limited Waiting Time......... 47 3.3.3 Queues with Impatient Customers and Geometric Service Times... 49 4 Priority Scheduling 51 4.1 Related Work.................................... 52 4.2 The Impact of Finite Buffers........................... 52 4.2.1 System Characteristics........................... 53 4.2.2 Finite High Priority Buffer........................ 54 4.2.3 Finite Low Priority Buffer......................... 58 4.2.4 Two Finite Buffers............................. 63 4.2.5 Two Infinite Buffers............................ 64 4.2.6 Numerical Examples............................ 67 4.2.7 Conclusions................................. 70 5 A Tree-Like Process Approach to Priority Modeling 71 5.1 Related Work.................................... 72 5.2 The Queueing Model................................ 72 5.3 A QBD Formulation................................ 73 5.4 A Tree-Like Process Approach.......................... 73 5.4.1 Definition of a Markov Process on a (K − η + 1)-ary Tree....... 74 5.4.2 The Infinitesimal Generator........................ 77 5.4.3 Constructing a Tree-Like QBD Process................. 79 5.5 K-Class Priority Queue as a Tree-Like Process................. 82 5.5.1 Characterization of the Tree-Like Process................ 84 5.5.2 Computing the V -Matrix......................... 87 5.5.3 Solving the Boundary Condition..................... 95 5.6 Loss Rate Computation.............................. 99 6 Multilevel Feedback Queues 105 6.1 Related Work.................................... 106 6.2 Introduction..................................... 106 6.3 QBDs on Binomial-Like Trees........................... 107 6.4 Steady State Analysis............................... 109 6.5 The Multilevel Feedback Queue.......................... 111 6.5.1 Markov Model............................... 112 6.5.2 Transition Matrices............................ 114 6.5.3 Performance Measures........................... 118 ii Contents III Transient Performance Measures 123 7 Quasi-Birth-Death Markov Chains 125 7.1 Related Work.................................... 126 7.2 Introduction..................................... 126 7.3 QBDs with Marked Time Epochs: a Review................... 127 7.4 QBD Reduction................................... 130 7.4.1 Computing the R-Matrices........................ 132 7.4.2 Computing the Invariant Probabilities.................. 136 7.4.3 Algorithmic Overview........................... 138 7.5 Numerical Examples................................ 141 8 Tree-Like Processes 147 8.1 Related Work.................................... 148 8.2 Introduction..................................... 148 8.3 Tree-Like Process with Marked Time Epochs.................. 149 8.3.1 Process Definition............................. 149 8.3.2 Discrete Erlangization and Reset Markov Chains............ 150 8.3.3 Computing the V -Matrix......................... 153 m 8.3.4 Calculating the Probability Vectors πn (J)................ 156 8.4 Transient Analysis of the CTM Protocol with Free Access........... 157 8.4.1 Protocol Definition............................. 157 8.4.2 Analytical Model.............................. 159 8.4.3 Performing a Transient Analysis..................... 160 Bibliography 172 Related Publications 173 Nederlandse Samenvatting 175 iii List of Figures 1.1 A basic queueing system..............................6 2.1 A Quasi-Birth-Death Markov chain........................ 13 2.2 Structure of the first three levels of a tree-structured Markov chain...... 14 3.1 Response time distribution of successful impatient customers......... 37 3.2 Response time distributions of successful service time (un)aware customers that are impatient in the entire system or only in the waiting room......... 38 3.3 Expected number of lost customers........................ 39 3.4 Expected response time of a successful impatient customer........... 39 + 4.1 Illustration of the functions z and ξ(A(z)), for z 2 R ............. 58 4.2 Comparison of the loss rate of low priority packets for each of the six approaches with λ1 = 0:4;H = 25;L = 20 and a varying rate λ2 .............. 68 4.3 Comparison of the low priority loss rate obtained by each of the six approaches for λ1 = 0:4; λ2 = 0:2;H = 25 and a varying capacity L ............ 69 4.4 Comparison of the coefficient for the tail approaches, λ1 = 0:4;H = 25;L = 20 70 5.1 Illustrative example of the stochastic process capturing the behavior of the 5-class priority queueing system with η = 3................... 76 5.2 Block sizes required for the QBD approach and the tree-structured process. 77 5.3 Block sizes required for the QBD approach and the tree-like process..... 80 5.4 Illustrative example from Figure 5.1( η = 3) revisited after the transformation of the Markov process into a tree-like QBD process............... 81 5.5 Dimensioning the high priority buffers...................... 101 5.6 Influence of the low priority service rates on the type-5 loss probabilities... 101 5.7 Influence of the low priority service rates on the type-5 loss probabilities under equal low priority arrival rates.......................... 102 5.8 Influence of the low priority arrival rates on the type-5 loss probability.... 103 5.9 Influence of the high priority traffic on the low priority loss rates....... 103 6.1 Structure of the first three levels of a binomial-like tree Markov chain and the matrices characterizing its transitions...................... 108 6.2 Average queue lengths in a multilevel feedback queue with 10 priorities and different arrival characteristics........................... 118 6.3 Average queue lengths in a multilevel feedback queue with 10 priorities under varying processing time distributions....................... 119 v List of Figures 6.4 Average queue length in the 10-class multilevel feedback queue........ 120 6.5 Average response time of type t customers in a multilevel feedback queue under varying arrival characteristics and with different processing time distributions 121 7.1 Queue length distributions of the D-MAP/PH/1 queue at time t = 50.... 141 7.2 Queue length distributions at different time epochs............... 142 7.3 Average queue length of the D-MAP/PH/1 queue............... 143 7.4 Execution times (s) to get the transient queue length distribution for r ≤ 50. 143 7.5 Waiting time distribution of the n-th customer in a D-MAP/PH/1 queue.. 144 7.6 Average waiting time of the n-th customer in a D-MAP/PH/1 queue..... 145 8.1 The CTM protocol for random multiple access communication........ 158 8.2 Throughput in slot n under Poisson arrivals................... 160 8.3 Initial throughput in the n-th slot under Poisson arrivals............ 161 8.4 Average time until the n-th event under Poisson input............. 162 8.5 Mean time until the i-th success of a size n conflict............... 163 8.6 Throughput in the n-th slot under MMPP
Recommended publications
  • CPU Scheduling
    Chapter 5: CPU Scheduling Operating System Concepts – 10th Edition Silberschatz, Galvin and Gagne ©2018 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multi-Processor Scheduling Real-Time CPU Scheduling Operating Systems Examples Algorithm Evaluation Operating System Concepts – 10th Edition 5.2 Silberschatz, Galvin and Gagne ©2018 Objectives Describe various CPU scheduling algorithms Assess CPU scheduling algorithms based on scheduling criteria Explain the issues related to multiprocessor and multicore scheduling Describe various real-time scheduling algorithms Describe the scheduling algorithms used in the Windows, Linux, and Solaris operating systems Apply modeling and simulations to evaluate CPU scheduling algorithms Operating System Concepts – 10th Edition 5.3 Silberschatz, Galvin and Gagne ©2018 Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU–I/O Burst Cycle – Process execution consists of a cycle of CPU execution and I/O wait CPU burst followed by I/O burst CPU burst distribution is of main concern Operating System Concepts – 10th Edition 5.4 Silberschatz, Galvin and Gagne ©2018 Histogram of CPU-burst Times Large number of short bursts Small number of longer bursts Operating System Concepts – 10th Edition 5.5 Silberschatz, Galvin and Gagne ©2018 CPU Scheduler The CPU scheduler selects from among the processes in ready queue, and allocates the a CPU core to one of them Queue may be ordered in various ways CPU scheduling decisions may take place when a
    [Show full text]
  • COS 318: Operating Systems CPU Scheduling
    COS 318: Operating Systems CPU Scheduling Jaswinder Pal Singh Computer Science Department Princeton University (http://www.cs.princeton.edu/courses/cos318/) Today’s Topics u CPU scheduling basics u CPU scheduling algorithms 2 When to Schedule? u Process/thread creation u Process/thread exit u Process thread blocks (on I/O, synchronization) u Interrupt (I/O, clock) 3 Preemptive and Non-Preemptive Scheduling Terminate Exited (call scheduler) Scheduler dispatch Running Block for resource (call scheduler) Yield, Interrupt (call scheduler) Ready Blocked Create Resource free, I/O completion interrupt (move to ready queue) 4 Scheduling Criteria u Assumptions l One process per user and one thread per process l Processes are independent u Goals for batch and interactive systems l Provide fairness l Everyone makes some progress; no one starves l Maximize CPU utilization • Not including idle process l Maximize throughput • Operations/second (min overhead, max resource utilization) l Minimize turnaround time • Batch jobs: time to execute (from submission to completion) l Shorten response time • Interactive jobs: time response (e.g. typing on a keyboard) l Proportionality • Meets user’s expectations Scheduling Criteria u Questions: l What are the goals for PCs versus servers? l Average response time vs. throughput l Average response time vs. fairness Problem Cases u Completely blind about job types l Little overlap between CPU and I/O u Optimization involves favoring jobs of type “A” over “B” l Lots of A’s? B’s starve u Interactive process trapped
    [Show full text]
  • CPU Scheduling
    CPU Scheduling CSE 2431: Introduction to Operating Systems Instructor: Adam C. Champion, Ph.D. Reading: Chapter 5, [OSC] (except Sections 5.7.2, 5.8) 1 Contents • Why Scheduling? • Basic Concepts of Scheduling • Scheduling Criteria • A Basic Scheduling Algorithm (FCFS) • Scheduling Algorithms (SJF, RR, etc.) • Thread Scheduling 2 Why Scheduling? • Deciding which process/thread should occupy the resource (CPU, disk, etc.) (CPU (horsepower)) I want to ride it Whose turn is it? Process 1 Process 2 Process 3 3 Contents • Why Scheduling? • Basic Concepts of Scheduling • Scheduling Criteria • A Basic Scheduling Algorithm (FCFS) • Scheduling Algorithms (SJF, RR, etc.) • Thread Scheduling 4 When to Schedule? 5 Contents • Why Scheduling? • Basic Concepts of Scheduling • Scheduling Criteria • Basic Scheduling Algorithm (FCFS) • Scheduling Algorithms (SJF, RR, etc.) • Thread Scheduling 6 Scheduling Objectives • Fairness (nobody cries) • Priority (ladies first) • Efficiency (make best use of equipment) • Encourage good behavior (good boy/girl) • Support heavy loads (degrade gracefully) • Adapt to different environments (interactive, real-time, multimedia) 7 Performance Criteria • Fairness: No starvation • Efficiency: keep resources as busy as possible • Throughput: # of processes completed in unit time • Turnaround time (also called elapsed time): Amount of time to complete a certainprocess from its beginning • Waiting Time: Amount of time process has been waiting in ready queue • Response Time: Amount of time from when a request was first submitted until first response is produced. • Policy Enforcement: Enforcing that stated policy is carried out • Proportionality: Meet users' expectations 8 • Meeting Deadlines: Avoid losing data Different Systems, Different Foci • For all – Fairness, policy enforcement, resource balance • Batch Systems – Max throughput, min turnaround time, max CPU utilization • Interactive Systems – Min Response time, best proportionality • Real-Time Systems – predictability, meeting deadlines 9 Preemptive vs.
    [Show full text]
  • Diagnosing, Predicting and Managing Application Performance in Virtualised Multi-Tenant Clouds
    Imperial College London Department of Computing Diagnosing, Predicting and Managing Application Performance in Virtualised Multi-Tenant Clouds Xi Chen Submitted in part fulfilment of the requirements for the degree of Doctor of Philosophy in Computing of Imperial College London and the Diploma of Imperial College London July 2016 Abstract As the computing industry enters the cloud era, multicore architectures and virtualisation technologies are replacing traditional IT infrastructures for several reasons including reduced infrastructure costs, lower energy consumption and ease of management. Cloud-based software systems are expected to deliver reliable performance under dynamic workloads while efficiently allocating resources. However, with the increasing diversity and sophistication of the environ- ment, managing performance of applications in such environments becomes difficult. The primary goal of this thesis is to gain insight into performance issues of applications run- ning in clouds. This is achieved by a number of innovations with respect to the monitoring, modelling and managing of virtualised computing systems: (i) Monitoring { we develop a mon- itoring and resource control platform that, unlike early cloud benchmarking systems, enables service level objectives (SLOs) to be expressed graphically as Performance Trees; these source both live and historical data. (ii) Modelling { we develop stochastic models based on Queue- ing Networks and Markov chains for predicting the performance of applications in multicore virtualised computing systems. The key feature of our techniques is their ability to charac- terise performance bottlenecks effectively by modelling both the hypervisor and the hardware. (iii) Managing { through the integration of our benchmarking and modelling techniques with a novel interference-aware prediction model, adaptive on-line reconfiguration and resource control in virtualised environments become lightweight target-specific operations that do not require sophisticated pre-training or micro-benchmarking.
    [Show full text]
  • Chapter 5: CPU Scheduling
    Chapter 5: CPU Scheduling Operating System Concepts – 10th Edition Silberschatz, Galvin and Gagne ©2018, revised by S. Weiss 2020 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multi-Processor Scheduling Real-Time CPU Scheduling Operating Systems Examples Algorithm Evaluation Operating System Concepts – 10th Edition 5.2 Silberschatz, Galvin and Gagne ©2018, revised by S. Weiss 2020 Objectives Understand difference between different types of scheduling Describe various CPU scheduling algorithms Assess CPU scheduling algorithms based on scheduling criteria Explain the issues related to multiprocessor and multicore scheduling Describe various real-time scheduling algorithms Describe the scheduling algorithms used in the Linux operating system Operating System Concepts – 10th Edition 5.3 Silberschatz, Galvin and Gagne ©2018, revised by S. Weiss 2020 Medium Term Scheduling The medium term scheduler controls the degree of multi- programming. It admits processes into memory to compete for the CPU Also called a swapper when it is used to control the process mix by removing and restoring processes Goal of medium term scheduler is to keep a good mix of processes in memory so that the CPU is always kept busy. Operating System Concepts – 10th Edition 5.4 Silberschatz, Galvin and Gagne ©2018, revised by S. Weiss 2020 Basic Problem Objective of multi-programming is to have some process running at all times, to maximize CPU utilization. Need to keep many programs in memory Process executes on CPU until it executes some instruction for which it has to wait (e.g. I/O) Process is removed from CPU and another must be chosen to run This is purpose of CPU scheduler: which process should run? Operating System Concepts – 10th Edition 5.5 Silberschatz, Galvin and Gagne ©2018, revised by S.
    [Show full text]
  • Optimization of Proactive Services with Uncertain Predictions
    Optimization of Proactive Services with Uncertain Predictions A Dissertation Presented by Ran Liu to The Department of Electrical and Computer Engineering in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Electrical and Computer Engineering Northeastern University Boston, Massachusetts October 2020 Contents List of Figures iv List of Tables vi List of Acronyms vii Acknowledgments viii Abstract of the Dissertation ix 1 Introduction 1 1.1 Background . 1 1.2 Proactive Caching and Proactive Computing Technologies . 3 1.2.1 Proactive Caching . 3 1.2.2 Proactive Computing . 7 1.3 Related Work . 9 2 Proactive Caching under Uncertain Predictions 12 2.1 Introduction . 12 2.2 System Model . 14 2.2.1 Network Model . 14 2.2.2 Service Model . 16 2.2.3 Problem Formulation . 19 2.3 Relation between Reactive Scheme and Proactive Schemes . 21 2.4 Threshold-based Proactive Strategy and Markov Chain . 26 2.4.1 Threshold-Based Proactive Strategies . 26 φ 2.4.2 Markov Chain of System under ΨP ..................... 26 2.5 Delay Comparison between UNIFORM and EDF strategies . 37 2.6 Numerical Evaluation . 39 2.6.1 Infinite Prediction Window Scenarios . 40 2.6.2 Finite Prediction Window Scenarios . 43 2.7 Summary . 46 i 3 Delay-Optimal Proactive Strategy under Uncertain Predictions 48 3.1 Introduction . 48 3.2 System Model . 50 3.2.1 Network Model . 50 3.3 System Model . 52 3.3.1 Server Model . 52 3.3.2 Service Model . 54 3.3.3 Problem Formulation . 57 3.4 Relation between Reactive Scheme and Proactive Schemes .
    [Show full text]
  • Lecture 5: September 18 5.1 Scheduling
    CMPSCI 377 Operating Systems Fall 2013 Lecture 5: September 18 Lecturer: Prashant Shenoy Scribe: Armand Halbert 5.1 Scheduling 5.1.1 Types of Schedulers Operating systems often utilize two types of schedulers: a long-term scheduler (also known as an admission scheduler or high-level) and a short-term scheduler (also known as a dispatcher). The names suggest the relative frequency with which these functions are performed. In this class when we talk about scheduling, we generally mean short-term scheduling. We also make some simplifying assumptions when talking about scheduling algorithms: one process per user, one thread per process, and that processes are independent of one another. The algorithms we will look at were developed in the 1970s when these assumptions were more realistic. A research problem today is how to relax these assumptions. In general a scheduler will want to favour I/O bound jobs over CPU bound jobs. An I/O bound job is one that does little actual computation and spends most of it's time waiting for I/O. A CPU bound job is the opposite of I/O bound: CPU bound jobs rarely do I/O and will hardly ever give up their time on the CPU before the scheduler forces them off the CPU. Wanting to maximize the use of the hardware leads to an overlap of I/O and computation (because I/O devices can be busy while other jobs are using the CPU). 5.1.1.1 Long-term Scheduler The long-term, or admission, scheduler decides which jobs or processes are to be admitted to the ready queue and how many processes should be admitted into the ready queue.
    [Show full text]
  • Operating System
    OPERATING SYSTEM For COMPUTER SCIENCE OPERATING SYSTEM . SYLLABUS Processes, threads, interprocess communication, concurrency and synchronization. Deadlock. CPU scheduling. Memory management and virtual memory. File systems. ANALYSIS OF GATE PAPERS Exam Year 1 Mark Ques. 2 Mark Ques. Total 2003 2 5 12 2004 3 4 11 2005 - 2 4 2006 1 8 17 2007 2 6 14 2008 2 5 12 2009 2 5 12 2010 3 2 7 2011 4 2 8 2012 1 4 9 2013 2 4 10 2014 Set-1 2 3 8 2014 Set-2 1 3 7 2014 Set-3 1 3 7 2015 Set-1 2 4 10 2015 Set-2 2 3 8 2015 Set-3 2 2 6 2016 Set-1 1 4 9 2016 Set-2 1 3 7 2017 Set-1 2 2 6 2017 Set-2 2 2 6 2018 4 6 10 © Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission CONTENTS Topics Page No 1. PROCESS AND DEADLOCK 1.1 Process Concept 1 1.2 Process States 1 1.3 Degree of Multiprogramming 1 1.4 Process Control Block 1 1.5 Threads 1 1.6 CPU Scheduling 2 1.7 Scheduling Algorithms 3 1.8 Deadlock 8 1.9 Three Types of Problems 12 1.10 Procedure Consumer Problem 12 1.11 Printer And Spooler Problem 13 1.12 Solution to IPC/ Synchronization 13 1.13 Solution to Producer Consumer Problem using Semaphores 15 1.14 Solution to Reader & Writer Problem 15 Gate Questions 17 2. MEMORY MANAGEMENT 2.1 Introduction 53 2.2 Single Partition Allocation 55 2.3 External & Internal Fragmentation 56 2.4 Segmentation 58 2.5 Fragmentation 59 2.6 Virtual Memory 59 2.7 Page Replacement 60 2.8 Demand Paging 61 2.9 Page-Replacement 61 2.10 Counting Algorithms 63 2.11 Allocation of Frames 63 2.12 Thrashing 64 3.
    [Show full text]
  • A New Dynamic Round Robin and SRTN Algorithm with Variable Original Time Slice and Intelligent Time Slice for Soft Real Time Systems
    International Journal of Computer Applications (0975 – 8887) Volume 16– No.1, February 2011 A New Dynamic Round Robin and SRTN Algorithm with Variable Original Time Slice and Intelligent Time Slice for Soft Real Time Systems H.S. Behera Simpi Patel Bijayalakshmi Panda Sr. Lecturer Student Student Veer Surendra Sai University Of Veer Surendra Sai University Of Veer Surendra Sai University Of Technology, Burla Technology, Burla Technology, Burla Sambalpur, India Sambalpur, India Sambalpur, India ABSTRACT some critical tasks might be delayed due to some system- The main objective of the paper is to improve the Round oriented processes that are bulky and time-consuming and not Robin (RR) algorithm using dynamic ITS by coalescing it preemptive.Adaptive real-time system adjusts the internal with Shortest Remaining Time Next (SRTN) algorithm thus strategies by giving response to the changes that are carried reducing the average waiting time, average turnaround time out in the environment. and the number of context switches. The original time slice has been calculated for each process based on its burst 1.1 Preliminaries time.This is mostly suited for soft real time systems where A program in execution is called a process. The processes, meeting of deadlines is desirable to increase its performance. waiting to be assigned to a processor are put in a queue called The advantage is that processes that are closer to their ready queue. CPU Utilization is the capacity to keep the CPU remaining completion time will get more chances to execute busy as much as possible as long as there are jobs to process.
    [Show full text]
  • CPU Scheduling
    CPU Scheduling CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections 6.7.2–6.8) 1 Contents • Why Scheduling? • Basic Concepts of Scheduling • Scheduling Criteria • A Basic Scheduling Algorithm (FCFS) • Scheduling Algorithms (SJF, RR, etc.) • Thread Scheduling 2 Why Scheduling? • Deciding which process/thread should occupy the resource (CPU, disk, etc.) (CPU (horsepower)) I want to ride it Whose turn is it? Process 1 Process 2 Process 3 3 Contents • Why Scheduling? • Basic Concepts of Scheduling • Scheduling Criteria • A Basic Scheduling Algorithm (FCFS) • Scheduling Algorithms (SJF, RR, etc.) • Thread Scheduling 4 When to Schedule? 5 Contents • Why Scheduling? • Basic Concepts of Scheduling • Scheduling Criteria • Basic Scheduling Algorithm (FCFS) • Scheduling Algorithms (SJF, RR, etc.) • Thread Scheduling 6 Scheduling Objectives • Fairness (nobody cries) • Priority (ladies first) • Efficiency (make best use of equipment) • Encourage good behavior (good boy/girl) • Support heavy loads (degrade gracefully) • Adapt to different environments (interactive, real- time, multimedia) 7 Performance Criteria • Fairness: No starvation • Efficiency keep resources as busy as possible • Throughput: # of processes completed in unit time • Turnaround Time (also called elapsed time): Amount of time to complete a particular process from its beginning • Waiting Time: Amount of time process has been waiting in ready queue • Response Time: Amount of time from when a request was first submitted until first response is produced. • Policy Enforcement: Enforcing that stated policy is carried out • Proportionality: Meet users' expectations • Meeting Deadlines: Avoid losing data 8 Different Systems, Different Foci • For all – Fairness, policy enforcement, resource balance • Batch Systems – Max throughput, min turnaround time, max CPU utilization • Interactive Systems – Min Response time, best proportionality • Real-Time Systems – predictability, meeting deadlines 9 Preemptive vs.
    [Show full text]