CGS 3763 Operating Systems Concepts Spring 2013

Slides:



Advertisements
Similar presentations
Scheduling Criteria CPU utilization – keep the CPU as busy as possible (from 0% to 100%) Throughput – # of processes that complete their execution per.
Advertisements

CPU Scheduling Algorithms
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Chapter 5 CPU Scheduling Bernard Chen Spring 2007.
Team Project 1 Dr. Sunny Jeong & M.H. Park. Priority Scheduling Define your own priority, at least two According to each priority, implements suitable.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Process CPUArrival Time P P2 3 0 P3 3 0 The Gantt Chart for the schedule is: Waiting time for P1 = (7-7)=0; P2 = (0-0)=0; P3 = (3-0)
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 5: CPU Scheduling.
UNIT–II: Process Management
lecture 5: CPU Scheduling
CPU SCHEDULING.
Dan C. Marinescu Office: HEC 439 B. Office hours: M, Wd 3 – 4:30 PM.
Chapter 5a: CPU Scheduling
April 6, 2001 Gary Kimura Lecture #6 April 6, 2001
CPU Scheduling Algorithms
Priority Scheduling Example
Process Scheduling B.Ramamurthy 9/16/2018.
Scheduling (Priority Based)
Chapter 5: CPU Scheduling
CPU Scheduling.
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Process management Information maintained by OS for process management
ICS 143 Principles of Operating Systems
CPU Scheduling Basic Concepts Scheduling Criteria
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
COT 4600 Operating Systems Spring 2011
Operating Systems Lecture 15.
Dan C. Marinescu Office: HEC 439 B. Office hours: M, Wd 3 – 4:30 PM.
Operating System Concepts
CGS 3763 Operating Systems Concepts Spring 2013
3: CPU Scheduling Basic Concepts Scheduling Criteria
CGS 3763 Operating Systems Concepts Spring 2013
Chapter5: CPU Scheduling
COT 4600 Operating Systems Spring 2011
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
COT 5611 Operating Systems Design Principles Spring 2014
Outline Scheduling algorithms Multi-processor scheduling
CGS 3763 Operating Systems Concepts Spring 2013
COT 4600 Operating Systems Fall 2009
Exercise Ms.Reema alOraini
CGS 3763 Operating Systems Concepts Spring 2013
Chapter 5: CPU Scheduling
Lecture 2 Part 3 CPU Scheduling
CGS 3763 Operating Systems Concepts Spring 2013
CSE 451: Operating Systems Winter 2003 Lecture 6 Scheduling
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Shortest-Job-First (SJR) Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
CPU SCHEDULING CPU SCHEDULING.
COT 5611 Operating Systems Design Principles Spring 2012
Chapter 6: Scheduling Algorithms Dr. Amjad Ali
Scheduling 21 May 2019.
Chapter 6: CPU Scheduling
EECE.4810/EECE.5730 Operating Systems
CGS 3763 Operating Systems Concepts Spring 2013
CPU Scheduling.
CPU Scheduling: Basic Concepts
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
CPU Scheduling CSE 2431: Introduction to Operating Systems
CSE 451: Operating Systems Winter 2001 Lecture 6 Scheduling
Presentation transcript:

CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11:30 - 12:30 AM

Lecture 24 – Wednesday, March 13, 2013 Last time: CPU Scheduling Today: CPU scheduling Next time Process synchronization Reading assignments Chapter 6 of the textbook Lecture 24

Comparison of FCFS, SJF, and RR We have three processes A, B, and C. Each process is characterized by Release time (R) – the time the process arrives in the system Start time (S) – the time the scheduler allows it to run Wait time (W) – the time till it has to wait until it is started: W = S - R Work (Wrk) – the amount of time it needs to use the CPU Finish time (F) – the time the process finishes: F=S+Wrk Time in system (T) – the time from when the process arrives until it finishes: T = F- R. We compare The average time in system The average waiting time for three scheduling policies: FCFS, SJF, and RR. Lecture 24

Proc Release time Work Start time Finish time Wait time till start Time in system A 3 B 1 5 3 + 5 = 8 3 – 1 = 2 8 – 1 = 7 C 2 8 8 + 2 = 10 8 – 3 = 5 10 – 3 = 7 A 3 B 1 5 5 + 5 = 10 4 10 – 1 = 9 C 2 3 + 2 = 5 5 – 3 = 2 A 3 6 6 – 0 = 6 B 1 5 10 1 – 1 = 0 10 – 1 = 9 C 2 8 5 – 3 = 2 8 – 3 = 5 Lecture 24

Average waiting time till the job started Average time in system Scheduling policy Average waiting time till the job started Average time in system FCFS 7/3 17/3 SJF 4/3 14/3 RR 3/3 20/3 Lecture 24

Priority scheduling Each thread/process has a priority and the one with the highest priority (smallest integer  highest priority) is scheduled next. Preemptive Non-preemptive SJF is a priority scheduling where priority is the predicted next CPU burst time Problem  Starvation – low priority threads/processes may never execute Solution to starvation  Aging – as time progresses increase the priority of the thread/process Priority my be computed dynamically Lecture 24

Priority inversion other types of software. A lower priority thread/process prevents a higher priority one from running. T3 has the highest priority, T1 has the lowest priority; T1 and T3 share a lock. T1 acquires the lock, then it is suspended when T3 starts. Eventually T3 requests the lock and it is suspended waiting for T1 to release the lock. T2 has higher priority than T1 and runs; neither T3 nor T1 can run; T1 due to its low priority, T3 because it needs the lock help by T1. Allow a low priority thread holding a lock to run with the higher priority of the thread which requests the lock other types of software. Lecture 24