TDC 311 Process Scheduling.

Slides:



Advertisements
Similar presentations
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Advertisements

Scheduling Criteria CPU utilization – keep the CPU as busy as possible (from 0% to 100%) Throughput – # of processes that complete their execution per.
CPU Scheduling Tanenbaum Ch 2.4 Silberchatz and Galvin Ch 5.
OS, , Part II CPU Scheduling Department of Computer Engineering, PSUWannarat Suntiamorntut.
Operating Systems Process Scheduling (Ch 3.2, )
Operating Systems CPU Scheduling. Agenda for Today What is Scheduler and its types Short-term scheduler Dispatcher Reasons for invoking scheduler Optimization.
Ceng Operating Systems Chapter 2.2 : Process Scheduling Process concept  Process scheduling Interprocess communication Deadlocks Threads.
WELCOME TO THETOPPERSWAY.COM
Chapter 3: 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
5: CPU-Scheduling1 Jerry Breecher OPERATING SYSTEMS SCHEDULING.
Job scheduling Queue discipline.
1Chapter 05, Fall 2008 CPU Scheduling The CPU scheduler (sometimes called the dispatcher or short-term scheduler): Selects a process from the ready queue.
Chapter 6: CPU Scheduling
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 5 Operating Systems.
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
Chapter 6 CPU SCHEDULING.
Scheduling Algorithms. A computer system has limited resources that must be shared among the processes competing for those resources. A computer system.
Chapter 6 Scheduling. Basic concepts Goal is maximum utilization –what does this mean? –cpu pegged at 100% ?? Most programs are I/O bound Thus some other.
Chapter 5 Processor Scheduling Introduction Processor (CPU) scheduling is the sharing of the processor(s) among the processes in the ready queue.
1 Uniprocessor Scheduling Chapter 9. 2 Aim of Scheduling Response time Throughput Processor efficiency.
Uniprocessor Scheduling
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Assign processes to be executed by the processor or processors: –Response time –Throughput –Processor.
6.1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Processor Scheduling Hank Levy. 22/4/2016 Goals for Multiprogramming In a multiprogramming system, we try to increase utilization and thruput by overlapping.
Lecture Topics: 11/15 CPU scheduling: –Scheduling goals and algorithms.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Operating Systems Scheduling. Scheduling Short term scheduler (CPU Scheduler) –Whenever the CPU becomes idle, a process must be selected for execution.
1 Uniprocessor Scheduling Chapter 3. 2 Alternating Sequence of CPU And I/O Bursts.
1 Lecture 5: CPU Scheduling Operating System Fall 2006.
Lecture 5 Scheduling. Today CPSC Tyson Kendon Updates Assignment 1 Assignment 2 Concept Review Scheduling Processes Concepts Algorithms.
1 Chapter 5: CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms.
1 Uniprocessor Scheduling Chapter 9. 2 Aim of Scheduling Assign processes to be executed by the processor(s) Response time Throughput Processor efficiency.
UNIT–II: Process Management
OPERATING SYSTEMS CS 3502 Fall 2017
Copyright ©: Nahrstedt, Angrave, Abdelzaher
CPU SCHEDULING.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Uniprocessor Scheduling
Networks and Operating Systems: Exercise Session 2
April 6, 2001 Gary Kimura Lecture #6 April 6, 2001
Uniprocessor Scheduling
Uniprocessor Scheduling
Chapter 2.2 : Process Scheduling
Process Scheduling B.Ramamurthy 9/16/2018.
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
CS 143A - Principles of Operating Systems
CPU Scheduling Basic Concepts Scheduling Criteria
Chapter 6: CPU Scheduling
Chapter 5: CPU Scheduling
Introduction What is an operating system bootstrap
OverView of Scheduling
Operating System Concepts
Chapter5: CPU Scheduling
Operating systems Process scheduling.
Chapter 9 Uniprocessor Scheduling
Chapter 6: CPU Scheduling
CPU SCHEDULING.
Process Scheduling Decide which process should run and for how long
Chapter 5: CPU Scheduling
Processor Scheduling Hank Levy 1.
Uniprocessor scheduling
Chapter 6: CPU Scheduling
Scheduling 21 May 2019.
Chapter 6: CPU Scheduling
Uniprocessor Scheduling
CPU Scheduling: Basic Concepts
Presentation transcript:

TDC 311 Process Scheduling

Three Different Types There are three different types of process scheduling Short-term - decision as to which available process will be executed by the processor Medium-term - decision to add to the number of processes that are partially or fully in main memory Long-term - decision to add to the pool of processes

Scheduling Criteria What criteria might an OS use to select a particular scheduling algorithm? Response time - Interval of time from the submission of request until the response begins to be received Turnaround time - Interval of time between the submission of a process and its completion. Good measure for batch jobs

Scheduling Criteria Continued Deadline - Time by which a processor must complete an assignment. Used in real-time systems Predictability - A given job should run in about the same amount of time and at about the same cost regardless of the load on the system Throughput - The number of processes completed per unit of time

Scheduling Criteria Continued Processor utilization - Percentage of time that the processor is busy Fairness - In absence of priorities and such, all processes should be treated equally However, priority systems are often used, which can alter the concept of fairness. (We will look at an example of a priority system later.)

Scheduling Algorithms For each of the scheduling algorithms, the following data will be used: Process Arrival Time Service Time(Burst Time) 1 0 3 2 2 6 3 4 4 4 6 5 5 8 2

1. First-come, First-served Simple algorithm, but if short (time) processes arrive after long (time) processes, short processes wait a long time. Favors CPU bound processes over I/O bound processes.

2. Shortest Job First Also known as shortest process next Non-preemptive

3. Shortest Remaining Time Essentially same algorithm as shortest job first, except… Preemptive

4. Round-robin q=1

5. Round-robin q=4

Multi-level Queues Most modern OSs use some form of multi-level queues

Multi-level Queues with Feedback But systems with feedback are even more prevalent

Example: VAX/VMS Scheduler always chooses from the head of the highest priority queue Priorities can be raised or lowered. For example, process requests I/O? Priority raised. Time slice expires? Priority dropped. Terminal I/O requested? Priority raised

Example: VAX/VMS Timesharing processes have priority 0-15, can go up or down, but always <= 15 Real-time processes have priority 16-31

Example: Windows 2000 Windows 2000 implements a priority-driven, preemptive scheduling system - the highest- priority runnable (ready) thread always runs When a thread is selected to run, it runs for an amount of time called a quantum A quantum is the length of time a thread is allowed to run before Windows 2000 interrupts the thread to find out whether another thread at the same priority level or higher is waiting to run or whether the thread’s priority needs to be reduced

Example: Windows 2000 Thread dispatching occurs at dispatch level and is triggered by any of the following events: A thread becomes ready to execute A thread leaves the running state because its time quantum ends, it terminates, or it enters a wait state A thread’s priority changes

Example: Windows 2000 When Windows 2000 selects a new thread to run, it performs a context switch Windows uses 32 priority levels, ranging from 0 to 31. Levels 16-31 denote real-time levels, while levels 1-15 denote variable (dynamic) levels. Level 0 is reserved for the zero page thread Level 31 denotes real-time time critical; level 16 denotes real-time idle; dynamic levels 1- 15 are broken into high, above normal, normal, below normal, and idle groups

Example: Windows 2000 The thread states are as follows: Ready Standby - selected to run next on a particular processor Running Waiting - waiting for an event Transition - ready for execution but is paged out of memory Terminated Initialized - while a thread is being created