Lecture 21: Introduction to Process Scheduling

Slides:



Advertisements
Similar presentations
Operating Systems Process Scheduling (Ch 3.2, )
Advertisements

© Ibrahim Korpeoglu Bilkent University
Operating System Process Scheduling (Ch 4.2, )
CS444/CS544 Operating Systems Scheduling 1/31/2007 Prof. Searleman
Chapter 8 – Processor Scheduling Outline 8.1 Introduction 8.2Scheduling Levels 8.3Preemptive vs. Nonpreemptive Scheduling 8.4Priorities 8.5Scheduling Objectives.
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
CPU Scheduling. Schedulers Process migrates among several queues –Device queue, job queue, ready queue Scheduler selects a process to run from these queues.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
CS444/CS544 Operating Systems Threads Introduction to CPU Scheduling 2/02/2006 Prof. Searleman
1Chapter 05, Fall 2008 CPU Scheduling The CPU scheduler (sometimes called the dispatcher or short-term scheduler): Selects a process from the ready queue.
CPU Scheduling Chapter 6 Chapter 6.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
1 Scheduling Processes. 2 Processes Each process has state, that includes its text and data, procedure call stack, etc. This state resides in memory.
Scheduling. Alternating Sequence of CPU And I/O Bursts.
CPU Scheduling CSCI 444/544 Operating Systems Fall 2008.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 31 – Multimedia OS (Part 1) Klara Nahrstedt Spring 2011.
2.5 Scheduling Given a multiprogramming system. Given a multiprogramming system. Many times when more than 1 process is waiting for the CPU (in the ready.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
Cpr E 308 Spring 2005 Process Scheduling Basic Question: Which process goes next? Personal Computers –Few processes, interactive, low response time Batch.
ITFN 2601 Introduction to Operating Systems Lecture 4 Scheduling.
Process Control Management
2.5 Scheduling. Given a multiprogramming system, there are many times when more than 1 process is waiting for the CPU (in the ready queue). Given a multiprogramming.
CSC 322 Operating Systems Concepts Lecture - 10: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 31 – Process Management (Part 1) Klara Nahrstedt Spring 2009.
Lecture Topics: 11/15 CPU scheduling: –Scheduling goals and algorithms.
CPU Scheduling CSCI Introduction By switching the CPU among processes, the O.S. can make the system more productive –Some process is running at.
CPU Scheduling Operating Systems CS 550. Last Time Deadlock Detection and Recovery Methods to handle deadlock – Ignore it! – Detect and Recover – Avoidance.
Operating Systems Scheduling. Scheduling Short term scheduler (CPU Scheduler) –Whenever the CPU becomes idle, a process must be selected for execution.
CPU Scheduling CS Introduction to Operating Systems.
CPU scheduling.  Single Process  one process at a time  Maximum CPU utilization obtained with multiprogramming  CPU idle :waiting time is wasted 2.
Lecture 5 Scheduling. Today CPSC Tyson Kendon Updates Assignment 1 Assignment 2 Concept Review Scheduling Processes Concepts Algorithms.
Scheduling.
CPU Scheduling Scheduling processes (or kernel-level threads) onto the cpu is one of the most important OS functions. The cpu is an expensive resource.
OPERATING SYSTEMS CS 3502 Fall 2017
Copyright ©: Nahrstedt, Angrave, Abdelzaher
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Chapter 5a: CPU Scheduling
April 6, 2001 Gary Kimura Lecture #6 April 6, 2001
Uniprocessor Scheduling
Chapter 2 Scheduling.
CPU Scheduling.
Chapter 8 – Processor Scheduling
Operating Systems Processes Scheduling.
Chapter 2.2 : Process Scheduling
CPU scheduling 6. Schedulers, CPU Scheduling 6.1. Schedulers
Lecture 24: Process Scheduling Examples and for Real-time Systems
Chapter 6: CPU Scheduling
Operating Systems CPU Scheduling.
Lecture 23: Process Scheduling for Interactive Systems
Chapter 6: CPU Scheduling
Andy Wang Operating Systems COP 4610 / CGS 5765
Lecture 21: Introduction to Process Scheduling
OverView of Scheduling
Operating System Concepts
Scheduling Adapted from:
TDC 311 Process Scheduling.
CPU SCHEDULING.
CPU scheduling decisions may take place when a process:
Chapter 5: CPU Scheduling
Process Scheduling Decide which process should run and for how long
CSE 451: Operating Systems Winter 2003 Lecture 6 Scheduling
Processor Scheduling Hank Levy 1.
Uniprocessor scheduling
Chapter 5: CPU Scheduling
Scheduling 21 May 2019.
Don Porter Portions courtesy Emmett Witchel
CPU Scheduling CSE 2431: Introduction to Operating Systems
CSE 451: Operating Systems Winter 2001 Lecture 6 Scheduling
Presentation transcript:

Lecture 21: Introduction to Process Scheduling

Review: Processes & Threads Resource ownership – Process or Task Scheduling/execution – Thread or lightweight process One process, one thread (MS-DOS) One process, multiple threads (Java Runtime) Multiple processes, one thread per process (Unix) Multiple processes, multiple threads (W2K, Solaris, Linux)

Review: Single Threaded and Multithreaded Process Models

Review: Process/Thread States Possible process states running blocked ready

Process behavior Different Types of jobs have different demands a CPU-bound process an I/O bound process

Process Scheduling When to run a different process? Which one to run?

When to schedule process New process is created Process terminates A process blocks on I/O, semaphore, etc. I/O interrupt occurs Hardware clock interrupts

Preemptive vs. Non-preemptive Non-preemptive Scheduling: Processes run until they have finished or block for I/O Preemptive Scheduling: Can forcibly suspend a process and switch to another Hardware Clock Interrupt helps in implementing preemption

Categories of Process Scheduling Batch Systems (Compute Servers) Many processes, not interactive, throughput is important Interactive Systems PC Real Time Systems Guaranteed response times, meet deadlines

Scheduling Algorithm Goals All Systems Fairness – giving each process a fair share of the CPU Policy enforcement – seeing that stated policy is carried out Balance – keeping all parts of the system busy

Scheduling Algorithm Goals Batch Systems Throughput – maximize jobs per hour Turnaround time – minimize time between submission and termination CPU utilization – keep the CPU busy all the time

Scheduling Algorithm Goals Interactive Systems Response time – respond to requests quickly Proportionality – meet users’ expectations

Scheduling Algorithm Goals Real-time Systems Meeting deadlines – avoid losing data Predictability – avoid quality degradation in multimedia systems

First Come First Serve (FCFS) Maintain queue of processes Schedule first in queue Scheduled job executes until it finishes or blocks for I/O Simple, easy to implement Not good for mix of short and long jobs Example: a short job arriving soon after a long one

FCFS Arrival time CPU burst P1: 4 36 8 112 1 13 I/O burst 16 13 16 20 P1: 4 36 8 112 1 I/O burst P2: 23 40 2 P3: 4 20 112 40 2 40 2 40 1 P4: 2 150 3 10 1

FCFS 13 16 20 P1: 4 36 8 112 1 P2: 23 40 2 P3: 4 20 112 40 2 40 2 40 1 P4: 2 150 3 10 1 Which process goes next? P1 idle P2 P3 P4 0 4 13 36 40 42

FCFS Time next ready 40 76 60 192 13 16 20 P1: 4 36 8 112 1 P2: 23 40 2 P3: 4 20 112 40 2 40 2 40 1 P4: 2 150 3 10 1 Which process goes next? P1 idle P2 P3 P4 0 4 13 36 40 42