Chapter 7 - Scheduling: Introduction Flashcards
(16 cards)
turnaround time?
Time from arrival to completion: T(completion) - T(arrival)
What does turnaround time capture?
How long a job spends in the system from arrival to finish
What is the convoy effect?
Short jobs wait behind long jobs, hurting responsiveness
When does FIFO perform poorly?
When job lengths vary
What is the main idea behind SJF (shortest job first)?
Run the shortest jobs first to reduce average turnaround time
Is SJF preemptive?
No — once a job starts, it runs until completion
When is SJF optimal?
When all jobs arrive at the same time and run-times are known
What is STCF (Shortest Time-to-Completion First)?
A preemptive version of SJF — it allows switching to a shorter job if one arrives
response time formula
T(response) = T(firstrun) − T(arrival)
What is Round Robin (RR) scheduling?
A preemptive algorithm where each job gets a fixed time slice (quantum) to run
What happens when a job’s time slice ends? (RR)
It is preempted and placed at the back of the queue
advantages of RR
- Good response time
- Fairness (no CPU hogging)
- Works well for interactive tasks
disadvantages of RR
- High context-switch overhead if time slice is too short
- Poor turnaround time due to frequent interruptions
Why is the CPU-only job assumption unrealistic?
Real programs use I/O for input/output and network access
What happens when a job performs I/O?
It blocks and can’t use the CPU, allowing other jobs to run
How should the OS respond to I/O events?
Treat CPU bursts as separate mini-jobs to avoid idle CPU time