Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.

Slides:



Advertisements
Similar presentations
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Advertisements

Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 5: CPU Scheduling.
Operating Systems Chapter 6
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.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 5: CPU Scheduling.
CS 311 – Lecture 23 Outline Kernel – Process subsystem Process scheduling Scheduling algorithms User mode and kernel mode Lecture 231CS Operating.
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.
02/04/2008CSCI 315 Operating Systems Design1 CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those accompanying.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Cs238 CPU Scheduling Dr. Alan R. Davis. CPU Scheduling The objective of multiprogramming is to have some process running at all times, to maximize CPU.
What we will cover…  CPU Scheduling  Basic Concepts  Scheduling Criteria  Scheduling Algorithms  Evaluations 1-1 Lecture 4.
CS 104 Introduction to Computer Science and Graphics Problems Operating Systems (2) Process Management 10/03/2008 Yang Song (Prepared by Yang Song and.
Chapter 5-CPU Scheduling
02/11/2004CSCI 315 Operating Systems Design1 CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those accompanying.
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
CPU Scheduling Introduction to Operating Systems: Module 13.
CS212: OPERATING SYSTEM Lecture 3: Process Scheduling 1.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
ICS Principles of Operating Systems Lecture 5 - CPU Scheduling Prof. Nalini Venkatasubramanian
Chapter 3 System Performance and Models. 2 Systems and Models The concept of modeling in the study of the dynamic behavior of simple system is be able.
Scheduling. Alternating Sequence of CPU And I/O Bursts.
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.
CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating Systems Examples Algorithm.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 5: CPU Scheduling.
Peng Lu. CPU Scheduling 1. Basic Concepts 2. Scheduling Criteria 3. Scheduling Algorithms 4. Multiple-Processor Scheduling 5. Real-Time Scheduling 2.
Process A program in execution. But, What does it mean to be “in execution”?
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 15 Scheduling Read Ch.
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.
Chapter 5: Process Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Basic Concepts Maximum CPU utilization can be obtained.
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.
CIS250 OPERATING SYSTEMS Chapter 6 - CPU Scheduling Basic Concepts The objective of multi-programming is have a program running at all times Maximize.
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.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
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.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
CPU Scheduling CSCI Introduction By switching the CPU among processes, the O.S. can make the system more productive –Some process is running at.
Introduction to Operating System Created by : Zahid Javed CPU Scheduling Fifth Lecture.
1 Uniprocessor Scheduling Chapter 3. 2 Alternating Sequence of CPU And I/O Bursts.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
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.
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.
Lecturer 5: Process Scheduling Process Scheduling  Criteria & Objectives Types of Scheduling  Long term  Medium term  Short term CPU Scheduling Algorithms.
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.
CPU Scheduling CSSE 332 Operating Systems Rose-Hulman Institute of Technology.
OPERATING SYSTEMS CS 3502 Fall 2017
Chapter 6: CPU Scheduling
CPU Scheduling G.Anuradha
Module 5: CPU Scheduling
3: CPU Scheduling Basic Concepts Scheduling Criteria
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 6: CPU Scheduling
CPU Scheduling: Basic Concepts
Module 5: CPU Scheduling
Presentation transcript:

Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.

 A system is a part of the real world that we wish to analyze  Made up of autonomous entities interacting with one another  A model is an abstract representation of a system  We use models in analysis and design  Only relevant properties are included

 Simulate a system’s behavior using a model  Models have tunable input parameters  Observe the simulation; analyze output  Predict behavior of the real system by analyzing behavior of the model  Behavior of the model depends on time, input parameters, and events generated within the environment

 We can model numerous systems using the following components:  User: a single user of the system  Service: a node providing a service  Queue: an array of users waiting for service

 Mathematical models can be categorized as:  Deterministic: ▪ Behavior is predictable with 100% certainty  Stochastic: ▪ Behavior is uncertain, based on random events

 A stochastic model is one that incorporates uncertainty into its behavior  One or more attributes change their values according to a probability distribution

 A probability distribution specifies the probability of each value of some random variable  Uniform distribution:  All values are equally probable

 A probability distribution specifies the probability of each value of some random variable  Normal distribution:  Values are more probable at or near the mean  This will form a bell curve

 A probability distribution specifies the probability of each value of some random variable  Exponential distribution:  Values are times between events in a Poisson process in which events occur both continuously and independently, but at a constant average rate

 To study the performance of an operating system, we can:  Take measurements on the real system ▪ e.g. Unix time command  Run a simulation model  Apply an analytical model ▪ e.g. Queuing theory, exponential distributions, etc.

 External performance goals:  Minimize user response time  Maximize throughput ▪ Number of jobs completed per unit time  Minimize turnaround time ▪ Average time to complete jobs  Maximize fairness  Maximize degree of multiprogramming ▪ Number of processes supported without degradation

 Internal performance goals:  Maximize CPU utilization  Maximize disk utilization  Minimize disk access time  Enforce priorities  Minimize overhead ▪ e.g. time for scheduling algorithm, context switching  Avoid starvation of long-running jobs  Enforce real-time deadlines (sometimes)

 Some key performance measures:  Average number of jobs in the system  Average number of jobs waiting in a queue  Average time a job spends in the system  Average time a job spends in the queues  CPU utilization  Total number of jobs serviced (i.e. throughput)

 Processes are created by the operating system  Processes initially added to a job queue, which contains all processes waiting to enter the system  From the job queue, processes that are ready for execution are added to the ready queue

 A long-term scheduler (i.e. job scheduler) selects processes from the job queue, adding those processes to the ready queue  A short-term scheduler (i.e. CPU scheduler) selects processes from the ready queue and allocates time with the CPU

 The long-term scheduler is invoked infrequently

 The degree of multiprogramming of an operating system is defined as the number of processes in memory  In a stable operating system, the average process arrival rate equals the average process departure rate

 The short-term scheduler decides which process the CPU executes next  The dispatcher gives control of the CPU to the process selected by the CPU scheduler:  Performs context switch  Switches to user mode  Jumps to the proper location in the user program to resume program execution

the dispatcher operates here

 Processes alternate between CPU execution and I/O wait  A CPU burst is actual program execution that uses the CPU  An I/O burst is a blocked state  Each process starts and ends with a CPU burst

 Histogram of CPU burst time frequencies

 CPU scheduling requires an algorithm to determine which process to dispatch next  Scheduling algorithms include:  First-Come, First-Served (FCFS)  Shortest-Job-First (SJF)  Round-Robin (RR)  Priority  Multilevel Queue (MQ)

 Preemptive scheduling preempts a running process before its time slice expires  Or it preempts a process because its time slice has expired  Non-preemptive scheduling gives a process exclusive uninterrupted access to the CPU for the entirety of its execution process

 Compare scheduling algorithms by measuring  CPU utilization – keep CPU as busy as possible  Throughput – maximize the number of processes that complete their execution per unit time  Turnaround time – minimize the elapsed time to fully execute a particular process  Waiting time – minimize the elapsed time a process waits in the ready queue