Process Control Management

Slides:



Advertisements
Similar presentations
Topic : Process Management Lecture By: Rupinder Kaur Lecturer IT, SRS Govt. Polytechnic College for Girls,Ludhiana.
Advertisements

Process Control Management Prepared by: Dhason Operating Systems AICT
OS, , Part II CPU Scheduling Department of Computer Engineering, PSUWannarat Suntiamorntut.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 16 Scheduling II.
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.
CPU Scheduling Algorithms
Chapter 3: CPU Scheduling
CS 311 – Lecture 23 Outline Kernel – Process subsystem Process scheduling Scheduling algorithms User mode and kernel mode Lecture 231CS Operating.
02/06/2008CSCI 315 Operating Systems Design1 CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those accompanying.
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.
CPU-Scheduling Whenever the CPU becomes idle, the operating system must select one of the processes in the ready queue to be executed. The short term scheduler.
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.
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
Chapter 6 CPU SCHEDULING.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Scheduling. Alternating Sequence of CPU And I/O Bursts.
Alternating Sequence of CPU And I/O Bursts. Histogram of CPU-burst Times.
CPU Scheduling Algorithms Simulation using Java Kaushal Sinha CSC 4320 Spring 2007.
CPU Scheduling Basic Concepts. Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor.
3.1 : Resource Management Part2 :Processor Management.
Chapter 5 CPU Scheduling Bernard Chen Spring 2007.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 7: CPU Scheduling Chapter 5.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
Chapter 5 Processor Scheduling Introduction Processor (CPU) scheduling is the sharing of the processor(s) among the processes in the ready queue.
Scanf n, a, b /* I-O wait */ for (i=1; i
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.
CSC 322 Operating Systems Concepts Lecture - 10: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
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.
CPU Scheduling Operating Systems CS 550. Last Time Deadlock Detection and Recovery Methods to handle deadlock – Ignore it! – Detect and Recover – Avoidance.
Introduction to Operating System Created by : Zahid Javed CPU Scheduling Fifth Lecture.
Operating Systems Scheduling. Scheduling Short term scheduler (CPU Scheduler) –Whenever the CPU becomes idle, a process must be selected for execution.
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.  Single Process  one process at a time  Maximum CPU utilization obtained with multiprogramming  CPU idle :waiting time is wasted 2.
1 Module 5: Scheduling CPU Scheduling Scheduling Algorithms Reading: Chapter
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.
CPU Scheduling Algorithms CSSE 332 Operating Systems Rose-Hulman Institute of Technology.
Scheduling.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
1 Chapter 5: CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms.
CPU SCHEDULING.
CPU Scheduling Algorithms
CPU scheduling 6. Schedulers, CPU Scheduling 6.1. Schedulers
Scheduling (Priority Based)
CPU Scheduling.
Lecture 23: Process Scheduling for Interactive Systems
Chapter 6: CPU Scheduling
Operating System Concepts
Chapter5: CPU Scheduling
COT 4600 Operating Systems Spring 2011
Exercise Ms.Reema alOraini
CGS 3763 Operating Systems Concepts Spring 2013
Processor Scheduling Hank Levy 1.
Uniprocessor scheduling
CPU SCHEDULING SIMULATION
CPU SCHEDULING CPU SCHEDULING.
Scheduling 21 May 2019.
CPU Scheduling ( Basic Concepts)
CPU Scheduling.
CPU Scheduling: Basic Concepts
Chapter 5: CPU Scheduling
Presentation transcript:

Process Control Management Operating Systems Process Control Management Prepared by: Dhason

Topic & Structure of the lesson CPU scheduling Preemptive scheduling algorithms Non-preemptive scheduling algorithms Calculations using preemptive scheduling algorithms

Learning Outcomes At the end of this lecture YOU should be able to: - explain the importance of CPU scheduling - distinguish between preemptive and non-preemptive algorithms - calculate waiting time and turnaround time

CPU Scheduling process to run first from the ready queue a CPU scheduler is tasked with choosing which process to run first from the ready queue a scheduling algorithm is used to choose the next process scheduling is a fundamental function of an operating system scheduling is done to ensure that the CPU is not idle

Aims of CPU Scheduling fairness - to make sure all processes get a fair share of the CPU time - to avoid starvation efficiency - to maximize CPU utilization and keep the CPU busy close to 100% of the time response time to provide consistent response time to minimize response time

Aims of Scheduling turnaround time - to minimize time between submission and job completion throughput - to maximize the number of jobs completed within a given time period

Types of CPU scheduling preemptive and non-preemptive scheduling: preemptive scheduling: - allows for processes running to be temporarily suspended processes releases CPU upon receiving a command from the operating system - preemptive scheduling algorithm: - round robin -

Non-preemptive Scheduling - processes releases the CPU only after completion - processes releases CPU voluntarily - non-preemptive scheduling algorithms: - first come first serve or first in first out (FCFS), ( FIFO) - shortest job first - priority

Quick Review Questions Why is CPU scheduling important? What is the difference between preemptive and non-preemptive scheduling? Give 1 example each for a preemptive and non-preemptive scheduling algorithm

Calculation Keywords CPU utilization / burst time throughput turnaround time - average turnaround time waiting time average waiting time

Round Robin the oldest, simplest, fairest and most widely used algorithm designed for time-sharing systems a time quantum / time slice is defined for each process the ready queue is treated as a circular queue to implement round robin, the ready queue is kept as a first in first out queue

Step1:- Draw a Gantt Chart to represent timings for all processes Round Robin Step1:- Draw a Gantt Chart to represent timings for all processes P1 P2 P3 P4 P5 Step2:- Calculate waiting time and average value TW(P1) = (0+6+2+1)=9 TW(P2) = 2 TW(P3) = 3 Tw(P4) = 5 Tw(P5) = (6+2+2)=10 TW(average)=(9+2+3+5+10)/5 =5.8 Milliseconds 2 3 5 6 8 10 12 14 15 17 19 Time Slice = 2 Milliseconds Process Burst Time (Milliseconds) P1 10 P2 1 P3 2 P4 P5 5

Round Robin Step-3: Calculate turn-around time and average value P1 P2 P3 P4 P5 2 3 5 6 8 10 12 14 15 17 19 TT = Tw+TB Time Slice = 2 Milliseconds TT(P1)=(9+10)=19 Process Burst Time (Milliseconds) P1 10 P2 1 P3 2 P4 P5 5 TT(P2)=(2+1) = 3 TT(P3)=(3+2) = 5 TT(P4)=(5+1) = 6 TT(P5)=(10+5)=15 Average turn around time is (19+3+5+6+15)/5 = (48/5)=9.6 Milliseconds

Round Robin the average waiting time is usually long performance depends on the size of the time quantum (10 – 100 milliseconds) process switching requires time; the time quantum clock is already running time quantum which is set to short would result in too many process switches and this reduces CPU efficiency time quantum which is too long would cause poor response to short interactive request (would result to FIFO)

Question and Answer Session Q & A

Next Session CPU Scheduling Non-preemptive Algorithms