7 - Scheduling Introduction Flashcards
October 7 quiz (42 cards)
What are scheduling policies also called?
disciplines
What is the workload?
the processes running in the system
What are jobs?
processes
What is the purpose of a scheduling metric?
lets us compare different scheduling policies
What is turnaround time?
type of metric
a scheduling and performance metric
What is the formula for turnaround time?
the time which the job completes minus the time which the job arrived in the system;
T turnaround = T completion - T arrival
What is another scheduling metric that is at odds with performance?
fairness
What is the most basic algorithm?
First-In-First-Out or First Come, First Serve
If all the jobs run for the same amount of time and arrive at the same time, which is the optimal algorithm?
FIFO, FCFS
If all the jobs run for different amount of time and arrive at the same time, which is the optimal algorithm?
Shortest Job First, SJF
What is the convoy effect?
A number of relatively-short potential consumers of a resource get queued behind a heavyweight consumer
Which algorithm is considered optimal?
theoretically
Shortest Job First
If all the jobs run for different amounts of time, arrive at different times, and don’t need to run to completion at once, which is the optimal algorithm?
Shortest Time-to-Completion First, STCF also known as Preemptive Shortest Job First, PSJF
How does Shortest Job First function?
It runs the shortest job first, then the next shortest, and so on.
Is SJF preemptive?
No, SJF is non-preemptive.
Using which algorithm can the scheduler preempt a job and run another job?
Shortest Time-to-Completion, STCF
How does STCF work?
Any time a new job enters the system, the STCF determines which of the remaining job, including the new job, has least time left, and schedules that one.
Time-shared machines gave birth to what metric?
response time
Which algorithm should be used if we knew job lengths, and that jobs only used the CPU, and our only metric was turnaround time?
STCF
What is response time?
the time from when the job arrives in a system to the first time it is scheduled
What is the formula for response time?
T response = T first run - T arrival
What does the last job have to do in STCF?
it has to wait for the previous jobs to run in their entirety before being scheduled just once.
How does Round-Robin work?
It runs a job for a time slice/scheduling quantum and then switches to the next job in the run queue. it repeatedly does so until the jobs are finished.
What is Round-Robin also known as?
time-slicing