SCHEDULING ALGORITHM

SCHEDULING ALGORITHM - SIT222 Operating Systems Session 03...

Info icon This preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
SIT222 Operating Systems Session 03. Process scheduling
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Outline Introduction to scheduling Objectives of scheduling Scheduling algorithms 2 SIT222 Session 3
Image of page 2
Introduction to scheduling Recall that a computer can run multiple processes at the same time by switching between them The context switch is the operating system function that switches from one processes to another One CPU/core can run one process at a time The CPU/core is then shared between all processes to give the appearance they are all running simultaneously • This is done many times per second 3 SIT222 Session 3
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Introduction to scheduling Previously we raised three problems to be solved for performing a context switch: How to get to kernel mode? • The timer sends an interrupt periodically How often to switch the CPU? • Determined by setting the time between interrupts sent by the timer What process to switch to? • This represents the problem of scheduling 4 SIT222 Session 3
Image of page 4
Introduction to scheduling Recall that every process in the system can be in one of three states: The operating system maintains a list of ready processes The scheduler selects which of these to run 5 SIT222 Session 3
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Introduction to scheduling Historically, computers were batch systems Jobs would run from start to completion without any interaction with the user When one job completed, the next job would be loaded Nowadays, computers are multiprogrammed Many processes competing for the CPU/cores at the same time CPU is switched between these processes 6 SIT222 Session 3
Image of page 6