Lecture 5 Flashcards
What is context switching?
In a single‐processor, multi‐processing systems, processes time‐share the CPU resources, called context switching
What is a CPU schedular?
A CPU Schedular (e.g. Short‐term Schedular) fetches processes from Ready‐Queue and allocates
What is the aim of processor scheduling?
Aim is to assign processes to be executed by the processor in a way that meets system objectives, such as response time, throughput, and processor efficiency
What are the 3 different types of processor scheduling?
Long term scheduling
Medium term scheduling
Short term scheduling
What does the Long-term schedular do?
Determines which programs are admitted to the system for processing
Controls the degree of multi-programming
What does the Medium-Term Scheduling do?
Part of the swapping function
• Swapping-in decisions are based on the need to
manage the degree of multi-programming
• Considers the memory requirements of the
swapped-out processes
What does the short-Term Scheduling do?
- Known as the dispatcher
- Executes most frequently
- Makes the fine-grained decision of which process to execute next
What is the short term scheduling criteria for User-oriented?
Response time in an interactive system
Relate to other behaviour of the system as perceived
by the individual user or process
What is the short term scheduling criteria for System-oriented?
Performance: Focus is on effective and efficient utilization of the processor (rate at which processes
are completed)
Minor importance on single-user systems
What is nonpreemptive in Decision mode?
Nonpreemptive
• Once a process is in the running state, it will continue until it terminates or blocks itself for I/O
Name 6 Scheduling algorithms
First-Come-First -Serve(FIFO) Shortest job first PRIOIRTY scheduling Shortest remaining time Round robin Multi queue scheduling
What is Preemptive in Decision mode?
Currently running process may be interrupted and moved to ready state by the OS
What is the First-Come-First-Served (FCFS) algorithm?
FIFO(queue)
The process that has been in the ready queue the longest is selected for running
Some principles of the FCFS Algorithm?
Performs much better for long processes than short ones
Tends to favour processor-bound processes over I/O bound processes
What is the shortest job first Algorithm?
- A short process will jump to the head of the queue
* Possibility of starvation for longer processes