Scheduling Computing Theory – F453.

Slides:



Advertisements
Similar presentations
G53OPS Operating Systems Graham Kendall Q Exam.
Advertisements

CS 149: Operating Systems February 3 Class Meeting
Ceng Operating Systems Chapter 2.2 : Process Scheduling Process concept  Process scheduling Interprocess communication Deadlocks Threads.
Operating Systems 1 K. Salah Module 2.1: CPU Scheduling Scheduling Types Scheduling Criteria Scheduling Algorithms Performance Evaluation.
Operating Systems (CSCI2413) Lecture 4 Process Scheduling phones off (please)
Cs238 CPU Scheduling Dr. Alan R. Davis. CPU Scheduling The objective of multiprogramming is to have some process running at all times, to maximize CPU.
FUNCTIONS OF OPERATING SYSTEMS Interfaces Memory Management Security Utility Interrupt Handling.
Chapter 6: CPU Scheduling
Classification of scheduling policies Preemptive methods (typical representative: RR) Non-preemptive methods (typical representative: FCFS) Preemption.
1 Our focus  scheduling a single CPU among all the processes in the system  Key Criteria: Maximize CPU utilization Maximize throughput Minimize waiting.
The Functions of Operating Systems Scheduling(multi-programming)
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.
CPU Scheduling CS Introduction to Operating Systems.
Process Scheduling. Scheduling Strategies Scheduling strategies can broadly fall into two categories  Co-operative scheduling is where the currently.
9691 Computing Paper 3 Section 3.1 The functions of Operating Systems.
Chapter 13 The Function of Operating Systems
CPU SCHEDULING.
Dan C. Marinescu Office: HEC 439 B. Office hours: M, Wd 3 – 4:30 PM.
Component 2 6G, H, I, J, K.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Process Description and Control
CPU scheduling 6. Schedulers, CPU Scheduling 6.1. Schedulers
Operating Systems Processes Scheduling.
Chapter 2.2 : Process Scheduling
Day 25 Uniprocessor scheduling
Process Scheduling B.Ramamurthy 9/16/2018.
Chapter 6: CPU Scheduling
Process Scheduling B.Ramamurthy 11/18/2018.
CPU Scheduling Basic Concepts Scheduling Criteria
Process Management with OS
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
COT 4600 Operating Systems Spring 2011
Andy Wang Operating Systems COP 4610 / CGS 5765
Chapter 13 The Function of Operating Systems
Operating System Concepts
3: CPU Scheduling Basic Concepts Scheduling Criteria
Process Scheduling B.Ramamurthy 12/5/2018.
Chapter5: CPU Scheduling
TDC 311 Process Scheduling.
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
CPU SCHEDULING.
Outline Scheduling algorithms Multi-processor scheduling
CPU scheduling decisions may take place when a process:
COT 4600 Operating Systems Fall 2009
Lesson Objectives Aims Key Words
Chapter 5: CPU Scheduling
Process Scheduling B.Ramamurthy 2/23/2019.
Process Scheduling B.Ramamurthy 2/23/2019.
Process Scheduling B.Ramamurthy 2/23/2019.
Process Scheduling B.Ramamurthy 4/11/2019.
Process Scheduling B.Ramamurthy 4/7/2019.
Scheduling.
Uniprocessor scheduling
Process Scheduling B.Ramamurthy 4/19/2019.
Uniprocessor Process Management & Process Scheduling
Process Scheduling B.Ramamurthy 4/24/2019.
Shortest-Job-First (SJR) Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Process Scheduling B.Ramamurthy 5/7/2019.
Scheduling 21 May 2019.
Chapter 6: CPU Scheduling
Uniprocessor Process Management & Process Scheduling
CPU Scheduling: Basic Concepts
Module 5: CPU Scheduling
Presentation transcript:

Scheduling Computing Theory – F453

Scheduling, Job Queues and Priorities Life requires Schedules, Priorities and Queues. Without them, nothing would function .

What are your priorities? Physical Spiritual Mental Emotional

Scheduling Look at a multi-user operating system there are a number of jobs that must be in the memory in order for the OS to switch from one job to another This means that the OS must have a set of rules that it can use in order to determine the order in which the jobs are handled. The use of this set of rules is called Scheduling.

Define The Term Scheduling “The use of a set of rules to determine the order in which jobs should be handled is called scheduling”

Scheduling rules The rules used in scheduling will be decided by the importance applied to the different jobs which need to be carried out. This concept of importance implies that the jobs can be arranged into some sort of order which can then be followed by the OS. In order to decide on the importance of a job, the CPU must decide on the job’s Priority

How do you order jobs in your life? Jobs that require physical strength (interfacing with physical objects) Jobs that require emotional strength (require processing and brain power)

A Processor has TWO types of jobs Jobs which require significant contact with peripheral devices Printing Playing Music Typing a letter Jobs which require significant use of the processor Calculating prime numbers Searching for data Sorting and filtering database results I/O Bound Jobs Processor Bound Jobs

Which Type of Job has Priority? I/O Bound Jobs Why do you think this would be the case? Processor Bound Jobs

Exam Practice! Past paper questions are one of the best ways to help you remember the answers when it matters….

Markscheme Answer:

Types of Scheduling – ROUND ROBIN Imagine you are settling an argument with a group of people. The fairest way to listen to everyone is to give them an equal slot of time to talk where you will listen to them. Round Robin is exactly this – each job is given an equal amount of time and dealt with in turn until all the jobs are processed.

Types of Scheduling – FCFS Imagine you have a queue at a supermarket of people waiting to pay. Would Round Robin work? Instead, the fairest way to deal with the customers is through the First Come First Served scheduling type. The first job to arrive in the queue gets all the processor time until it is complete and the processor moves on.

Types of Scheduling – SJF Consider your coursework. What is the easiest way to compile a huge file of documentation? Do the Shortest Job First, then move onto to the larger tasks and finally, while your motivation is at it’s highest – tackle the long job. But what if we kept giving you other medium sized tasks to complete?

Types of Scheduling – SRT Consider your prep. You have tried the RR approach, but there’s still loads to do. You want to see your pile of work diminish in the quickest way… Do the Shortest Remaining Time, then move onto to the longer tasks and the quickest prep gets done, and it looks like you have done more, as more tasks get finished! But what if we kept giving you other shorter tasks to complete?

Types of Scheduling – MFQ Multilevel Feedback Queues involve a very complex algorithm which makes use of a number of queues set up according to rules and act like a set of league tables. Those jobs that use more peripheral time drop down the league table, with some being relegated to other ‘lower’ queues. When one job finishes, another job can then be promoted.

Match the scenario to the scheduling You are given three tasks and you do them in the order you are given them. You are given three tasks and you do the quick tasks then move onto the long boring one. You are given three tasks and you devise a system where an alarm goes off if you spend too much time on the task which makes you move onto another high priority job. You are given three tasks and you do a bit of each until they are all done. RR FCFS MFQ SJF

Exam Practice! Past paper questions are one of the best ways to help you remember the answers when it really matters….

Markscheme Answer:

Why use scheduling anyway? Scheduling is used to try to: Maximise the use of the computer system. Allow all users ‘fair’ processing time Create a reasonable response time for everyone Prevent the system from being overloaded or blocked.

Job States Jobs in the processor can be in any of three states READY RUNNING BLOCKED leaves processor enters processor

What controls the jobs? Scheduling within the processor is controlled by… THE SCHEDULER! The scheduler is split into three parts: The High Level Scheduler The Medium Level Scheduler The Low Level Scheduler

The Scheduler The part of the OS that controls jobs in the processor is called The Scheduler Different tasks are carried out by different parts of the schedule – when a job wants to be processed, it enters the system and the Scheduler places it into the Ready Queue. It is the High Level Scheduler (HLS) that loads the job into the Ready Queue.

The Scheduler When the job that is currently running has to stop, then the job at the top of the Ready Queue is loaded into the processor to be run. It is the Low Level Scheduler (LLS) that loads the job from the Ready Queue to the processor. At this point, jobs may leave the ‘running’ state for three reasons.

The Scheduler Can you think of FOUR reasons why a job may move from the ‘running’ state? Peripheral Required  ‘blocked’ Processing Time is up  ‘ready’ Job Finished Higher Priority Job  ‘ready’

The Scheduler – We missed the MLS! The Medium Level Scheduler is responsible for moving jobs between primary and secondary storage. It is the Medium Level Scheduler (MLS) is a pre-epmtive scheduler. It is allowed to move jobs out of the ‘running’ state into the ready queue. Some jobs can only be moved out of ‘running’ if they need I/O or have completed – these are called ‘Non-Pre- emptive’ READY RUNNING BLOCKED leaves processor enters processor MLS HLS LLS LLS

Key Terms: Scheduling Scheduler Priority I/O Bound Jobs Processor Bound Jobs Round Robin SJF FCFS MFQ Job State (ready, running, blocked) High Level Scheduler Medium Level Scheduler Low Level Scheduler Pre-emptive Scheduler Non-Pre-emptive Scheduler