7. CPU Scheduling Flashcards
What is a workload
Processes running in a system
What is a job
A process
What is turnaround time
Time of completion minus time of arrival
What is fairness
The degree of which all processes will have an equal opportunity to use the CPU and memory.
What is the first in first out (FIFO) scheduling algorithm?
It is a non-preemptive algorithm that runs the first job that comes first.
What is average turnaround time?
The sum of turnaround time divided by the number of jobs
What is the convoy effect?
It is when a number of relatively-short jobs get queued up behind a long job.
What is the shortest job first (SJF) scheduling algorithm?
It is a non-preemptive algorithm that runs the shortest job first.
What is the shortest time-to-completion first (STCF) scheduling algorithm?
It is a preemptive algorithm that prioritises the job that has the least time left to completion.
What is response time?
Time of first run minus time of first arrival
What is round robin?
It is a preemptive algorithm that divides each process to run for a time slice (quantum). Once the time slice is used, it will switch to the next process.
Which algorithms are good for turnaround time and response time respectively?
FIFO: Not good for both
RR: Good for response time, but not good for turnaround time
SJF: Good for turnaround time, but not good for response time
STCF: Good for turnaround time, but not good for response time
What happens when an I/O request issued in scheduling?
The other processes will get to run while the I/O is being executed. The process that will be scheduled next depends on the scheduling algorithm.