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.

Slides:



Advertisements
Similar presentations
Scheduling Introduction to Scheduling
Advertisements

Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
G53OPS Operating Systems Graham Kendall Q Exam.
CPU Scheduling Tanenbaum Ch 2.4 Silberchatz and Galvin Ch 5.
Topic : Process Management Lecture By: Rupinder Kaur Lecturer IT, SRS Govt. Polytechnic College for Girls,Ludhiana.
OS, , Part II CPU Scheduling Department of Computer Engineering, PSUWannarat Suntiamorntut.
Operating Systems Process Scheduling (Ch 3.2, )
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 5: CPU Scheduling.
Operating Systems CPU Scheduling. Agenda for Today What is Scheduler and its types Short-term scheduler Dispatcher Reasons for invoking scheduler Optimization.
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008,
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008,
Day 25 Uniprocessor scheduling. Algorithm: Selection function Selection function – which process among ready processes to select. w – time spent in system,
1 Traditional Unix Scheduling “Traditional” means –No consideration on realtime processes. –Typically 4.3BSD and SVR3 MFQ-based –Preemptive (time quantum.
Operating System Process Scheduling (Ch 4.2, )
Operating System I Process Scheduling. Schedulers F Short-Term –“Which process gets the CPU?” –Fast, since once per 100 ms F Long-Term (batch) –“Which.
CS 311 – Lecture 23 Outline Kernel – Process subsystem Process scheduling Scheduling algorithms User mode and kernel mode Lecture 231CS Operating.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling The key to multiprogramming is scheduling Scheduling is done to meet the goals of –Response time.
1 Thursday, June 15, 2006 Confucius says: He who play in root, eventually kill tree.
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.
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Process Scheduling in Windows XP, Linux, and UNIX By Sarah G. Levinson CSC 4320.
Operating System 3 PROCESS DESCRIPTION AND CONTROL.
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.
Operating System Examples - Scheduling
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.
Operating System 3 PROCESS DESCRIPTION AND CONTROL.
Scheduling. Alternating Sequence of CPU And I/O Bursts.
1 RTOS Design Some of the content of this set of slides is taken from the documentation existing on the FreeRTOS website
Alternating Sequence of CPU And I/O Bursts. Histogram of CPU-burst Times.
CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating Systems Examples Algorithm.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 5: CPU Scheduling.
What Every Developer Should Know about the Kernel Dr. Michael L. Collard 1.
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
1 Uniprocessor Scheduling Chapter 9. 2 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.
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.
CS 390 Unix Programming Environment
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
1 Uniprocessor Scheduling Chapter 3. 2 Alternating Sequence of CPU And I/O Bursts.
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008,
Process Scheduling. Scheduling Strategies Scheduling strategies can broadly fall into two categories  Co-operative scheduling is where the currently.
1 Lecture 5: CPU Scheduling Operating System Fall 2006.
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.
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Chapter 5a: CPU Scheduling
Uniprocessor Scheduling
Operating Systems Processes Scheduling.
Uniprocessor Scheduling
Structure of Processes
CPU Scheduling Basic Concepts Scheduling Criteria
Chapter 5: CPU Scheduling
COT 4600 Operating Systems Spring 2011
OverView of Scheduling
Lecture 17 Syed Mansoor Sarwar
Chapter5: CPU Scheduling
Chapter 5: CPU Scheduling
Chapter 9 Uniprocessor Scheduling
Process Scheduling Decide which process should run and for how long
Operating System 3 PROCESS DESCRIPTION AND CONTROL
Lecture 2 Part 3 CPU Scheduling
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
Shortest-Job-First (SJR) Scheduling
Uniprocessor Scheduling
CPU Scheduling: Basic Concepts
Presentation transcript:

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 assigned a priority CPU is allocated based on the priority of the process

Process Scheduling Unix uses the round robin with multilevel feedback In short, CPU is allocated to a process for a time quantum, when the time quantum is exceeded, the process is preempted and is added to one of several priority queues.

RRMF quantum = 24 CPU

Scheduling Algorithm

Scheduling Parameters Priority Field Two ranges for priorities –User priorities –Kernel priorities High Low

Range of Priorities Ranges of process priorities –0 thru 127 (system dependent) –Threshold Priority (50) PUSER 50 – user mode execution –Priorities less then 50 are general kernel level processes PSWP 0 - kernel mode while swapping

Priority Ranges 0 50

Priorities Some Priorities are hard coded –Process that about to go to sleep receive a priority based on reason for sleeping Some are calculated –Decay function CPU ~ CPU/2 –Priority ~ (recent CPU usage/2) + base priority

When Are Priorities Changed When a process is about to sleep Process returning from kernel mode to user mode After the CPU usage is recalculated (caused by the clock)

Priority Example 3 process –Initial priority 60 –Clock interrupts 60 times a second –No syscalls –No other processes are ready to run

Priority Example

Priority Example 2

User Influence on Priorities Users can have a nominal impact on the priority assigned to their process Nice systcall –nice(value) –Where value is added to the priority calculation –P = (recent CPU usage/2) +(base P) + nice

Fair Share Scheduling Similar in concept to RRML, but allows block of time to be allocated to a set or groups of processes Divide user community into set of fare share groups

Fair Share Scheduling Processes within a group are subject to the same scheduling and priority constraints Each group or set of processes are allocated a portion of the CPU