Process Scheduling Flashcards
Learn the methods
What is Context Switching?
When a processor switches to another process, where the system saves the state of the previous process to be loaded for the new process.
What method is used when deciding to run a process?
Scheduling Algorithm
What are the two Scheduling classes and describe them?
Non-preemptive - where a running process can move to the blocked state by choosing to do so itself. Also where a process is not allowed to be interrupted.
Preemptive - where a process moves itself to the blocked state or the OS automatically moves it there due to clock interrupt.
What are the two methods of measuring algorithm performance and what do they measure specifically?
Average Response Time - measures when a process starts
average Turnaround Time - measures when a process ends
What is FCFS and how does it work?
First Come First Served
Runs the first process from the queue. Runs each process at a time until it’s finished. This means it is a non-preemptive algorithm.
What is SJF and how does it work?
Shortest Job First
Runs the process with the shortest length first. It runs each process until finished which means it is non-preemptive.
What is RR and how does it work?
Round Robin.
Where the time slice of each process is interrupted and the next process runs. As each process finishes, it is then deleted from the queue. It is a preemptive algorithm.
What is PQ and how does it work?
Priority Queues
Focuses on processes with the highest priority. A process with priority 1 means “first priority”. Processes with similar priorities follows the RR algorithm. PQ is preemptive algorithm.