Process Scheduling Flashcards
(15 cards)
One of the downsides to context switching
Time is spent doing this
The system does no useful work while context switching
What is context switch
When the processor switches to another process and saves the state of the old process and loads and the saved state for the new process
What does the scheduler do
Decide which process to run first
What are the two major classes of operating system scheduling
Pre-emptive and nonpreemptive
What is nonpreemptive scheduling
I’m running Process may only move to the block state by choosing to do so itself
What is pre-emptive scheduling
A process may move itself to the block state or be moved automatically by the OS
What are the performance measures of scheduling algorithms
Average response time and average turnaround time
What is average response time
The amount of time taken for all the processes in a process queue to start
What is the average turnaround time
The average time taken for all of the processes in the process queue to finish
What are the four scheduling algorithms
First-come first-served
Shortest job first
Round robin
Priority queue
What is first come first serve scheduling
When the process schedule starts the processes in the queue in order that they entered the queue
First-come first-served is a nonpreemptive algorithm
What is the shortest job first scheduling
The scheduling algorithm finds out the estimated length of each process
Processes are started in order of the shortest one first
Shortest first is a nonpreemptive algorithm
What is round robin scheduling
Each process is given a time slice
Once their time is up the next process is allowed its time slice
Preemptive algorithm
What is the priority queue scheduling algorithm
Depending on the priority of the process
Process with highest priority runs first
Priority 1 is highest priority
Processes with equal priority we use round robin
Try calculating the turnaround and response
.