Lecture 17 Syed Mansoor Sarwar

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

COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008,
1 Traditional Unix Scheduling “Traditional” means –No consideration on realtime processes. –Typically 4.3BSD and SVR3 MFQ-based –Preemptive (time quantum.
Scheduling. Unix Scheduling Allocating CPU to a Process The amount of time that a process is allocated the CPU is called a time quantum Processes are.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling The key to multiprogramming is scheduling Scheduling is done to meet the goals of –Response time.
1 Multilevel Feedback Queue Scheduling Another way to put a preference on short-lived processes –Penalize processes that have been running longer. Preemptive.
1 Uniprocessor Scheduling Chapter 9. 2 Aims of Scheduling Assign processes to be executed by the processor(s) Response time Throughput Processor efficiency.
Process Scheduling in Windows XP, Linux, and UNIX By Sarah G. Levinson CSC 4320.
1 Uniprocessor Scheduling Chapter 9. 2 Aim of Scheduling Main Job: Assign processes to be executed by the processor(s) and processes to be loaded in main.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Uniprocessor Scheduling Chapter 9. Aim of Scheduling To improve: Response time: time it takes a system to react to a given input Turnaround Time (TAT)
1 Scheduling The part of the OS that makes the choice of which process to run next is called the scheduler and the algorithm it uses is called the scheduling.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
1 Uniprocessor Scheduling Chapter 9. 2 Aim of Scheduling Response time Throughput Processor efficiency.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Response time Throughput Processor efficiency.
Uniprocessor Scheduling
Traditional UNIX Scheduling Scheduling algorithm objectives Provide good response time for interactive users Ensure that low-priority background jobs do.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Assign processes to be executed by the processor or processors: –Response time –Throughput –Processor.
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008,
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling 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.
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
UNIT–II: Process Management
CPU SCHEDULING.
Chapter 5a: CPU Scheduling
April 6, 2001 Gary Kimura Lecture #6 April 6, 2001
CPU Scheduling Algorithms
CPU scheduling 6. Schedulers, CPU Scheduling 6.1. Schedulers
Operating Systems Processes Scheduling.
Uniprocessor Scheduling
Chapter 2.2 : Process Scheduling
Day 25 Uniprocessor scheduling
Lecture 45 Syed Mansoor Sarwar
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
CS 143A - Principles of Operating Systems
CPU Scheduling Basic Concepts Scheduling Criteria
CPU Scheduling G.Anuradha
Lecture 16 Syed Mansoor Sarwar
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
COT 4600 Operating Systems Spring 2011
Operating Systems Lecture 15.
Lecture 6: Uniprocessor Scheduling(cont.)
Operating System Concepts
Multilevel Queue Scheduling Algorithms
Lecture 40 Syed Mansoor Sarwar
3: CPU Scheduling Basic Concepts Scheduling Criteria
Chapter5: CPU Scheduling
COT 4600 Operating Systems Spring 2011
Chapter 5: CPU Scheduling
Chapter 9 Uniprocessor Scheduling
Chapter 6: CPU Scheduling
Outline Scheduling algorithms Multi-processor scheduling
Operating System Concepts
COT 4600 Operating Systems Fall 2009
Chapter 5: CPU Scheduling
Lecture 18 Syed Mansoor Sarwar
Processor Scheduling Hank Levy 1.
Shortest-Job-First (SJR) Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Scheduling 21 May 2019.
Chapter 6: CPU Scheduling
Uniprocessor Scheduling
CPU Scheduling: Basic Concepts
Module 5: CPU Scheduling
Presentation transcript:

Lecture 17 Syed Mansoor Sarwar Operating Systems Lecture 17 Syed Mansoor Sarwar

© Copyright Virtual University of Pakistan Agenda for Today Review of previous lecture Multi-level queues scheduling Multi-level feedback queues scheduling UNIX System V scheduling Algorithm evaluation Recap of lecture 4 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Review of Lecture 16 Shortest-Job-First is optimal Round-Robin scheduling Multi-level queues scheduling 4 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Multilevel Queues 4 December 2018 © Copyright Virtual University of Pakistan

Multilevel Feedback Queues A process can move between the various queues; aging can be implemented this way. Multilevel-feedback-queue scheduler defined by the following parameters: Number of queues Scheduling algorithms for each queue 4 December 2018 © Copyright Virtual University of Pakistan

Multilevel Feedback Queues Method used to determine when to upgrade a process Method used to determine when to demote a process Method used to determine which queue a process will enter when that process needs service 4 December 2018 © Copyright Virtual University of Pakistan

Multilevel Feedback Queues 4 December 2018 © Copyright Virtual University of Pakistan

UNIX System V Scheduling Algorithm Multilevel feedback priority queues with round robin within each queue Quantum = 1 second Priorities are divided into two groups/bands: Kernel Group User Group 4 December 2018 © Copyright Virtual University of Pakistan

UNIX System V Scheduling Algorithm Priorities in the Kernel Group are assigned in a manner to minimize bottlenecks: processes waiting in a lower-level routine get higher priorities than those waiting at relatively higher-level routines. 4 December 2018 © Copyright Virtual University of Pakistan

UNIX System V Scheduling Algorithm In decreasing order of priority, the bands are: Swapper Block I/O device control processes File manipulation Character I/O device control processes User processes 4 December 2018 © Copyright Virtual University of Pakistan

UNIX System V Scheduling Algorithm Priorities of processes in the Kernel Group remain fixed. Priorities of processes in the User Group are recalculated every second. Inside the User Group, the CPU-bound processes are penalized at the expense of I/O-bound processes 4 December 2018 © Copyright Virtual University of Pakistan

UNIX System V Scheduling Algorithm 4 December 2018 © Copyright Virtual University of Pakistan

UNIX System V Scheduling Algorithm The CPU usage of each process is updated every clock tick by the clock ISR. Every second, a decay function is applied to the CPU usage of each process in the ready queue: Decay (CPU Usage)=(CPU Usage)/2 Priority number of each process is recomputed every second 4 December 2018 © Copyright Virtual University of Pakistan

UNIX System V Scheduling Algorithm Every second, the priority number of all those processes that are in the main memory and ready to run is updated by using the following formula: Priority# = (Recent CPU Usage)/2 + Thr. Pri.+ nice Threshold priority and nice values are always positive to prevent a user from migrating out of its assigned group 4 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan UNIX System V Example PA PB PC CPU Count 1 … 60 30 15 7 8 67 33 16 CPU Count 1 … 60 30 15 7 8 67 33 CPU Count 1 … 60 30 15 7 Time Priority 60 75 67 63 76 68 Priority 60 75 67 63 76 Priority 60 75 67 63 1 2 3 4 5 4 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Recap of Lecture Multi-level queues scheduling Multi-level feedback queues scheduling UNIX System V scheduling 4 December 2018 © Copyright Virtual University of Pakistan