Calculate average waiting time using FCFS and SJF for burst times 21, 3, 6 and 2, all arrival time 0. Draw Gantt chart.
Chapter 2
Scheduling Goals and Scheduler Types
Learn scheduling objectives and roles of long-term, short-term, and medium-term schedulers.
Scheduling means deciding who gets CPU next so the system stays fair and efficient.
You need metrics before comparing algorithms; otherwise calculations are mechanical but not meaningful.
Key Metrics
From notesClear explanation
Turnaround time measures total completion delay; waiting time is time in ready queue; response time is time until first output.
What it really means
Different stakeholders care about different delays: user-perceived start vs full completion.
Example
Interactive apps prioritize response time, while batch jobs often prioritize throughput.
Key takeaway
Pick algorithm by workload goals, not habit.
Scheduler Layers
From notesClear explanation
Long-term controls admission, short-term dispatches CPU frequently, medium-term handles swapping/suspension.
What it really means
Think of airport flow: entry control, gate assignment, and temporary holding.
Example
Long-term decides how many jobs enter memory, short-term dispatches every few milliseconds, medium-term swaps suspended jobs.
Key takeaway
Scheduler roles operate at different time scales.
How Scheduler Types Work Together
Added clarityClear explanation
Long-term scheduler controls degree of multiprogramming, short-term scheduler picks next ready process, and medium-term scheduler performs suspend/resume via swapping.
What it really means
Think of a hospital: admission desk (long-term), doctor assignment desk (short-term), and temporary observation transfer (medium-term).
Example
If memory gets crowded, medium-term scheduler can swap out blocked processes and bring them back later.
Key takeaway
Scheduler types are complementary layers, not alternatives.
- - Mixing response time with turnaround time
- - Ignoring queueing model and admission control
- - Assuming one metric can be optimized without trade-off
- - Throughput and CPU utilization -> maximize
- - Waiting, turnaround, response -> usually minimize
- - Short-term scheduler picks next ready process
Exam lens for this topic
What evaluators usually expect in structured exam answers.
Must-use keywords
- - scheduler
- - scheduling
- - throughput
- - turnaround
- - response time
Answer flow
- - Write exact definition in first line
- - Explain mechanism in ordered bullets
- - Add one short example or scenario
- - Close with key takeaway and one exam keyword
Practice Questions
Define Scheduler, Scheduling, Scheduling Algorithm with example.
Source: IMP Questions
Answer focus: Clear distinctions with one scenario.
Define Throughput, Waiting Time, Turnaround Time, Response Time, CPU Utilization.
Source: IMP Questions
Answer focus: Precise formulas and interpretation.
Practice from papers (end-of-topic set)
These paper questions map directly to this topic. Solve now, then compare your structure with linked topics.
Calculate average turnaround and waiting time for Round Robin (q=3) and Priority Scheduling for five processes with given burst and priorities.
Implement Round Robin (q=3) for five processes (same arrival) and find average turnaround and waiting time.
Apply Longest Remaining Time First (LRTF) for three processes and calculate average turnaround time.
Question Bank Linked Here
Open all questionsCalculate average waiting time using FCFS and SJF for burst times 21, 3, 6 and 2, all arrival time 0. Draw Gantt chart.
Calculate average turnaround and waiting time for Round Robin (q=3) and Priority Scheduling for five processes with given burst and priorities.
Implement Round Robin (q=3) for five processes (same arrival) and find average turnaround and waiting time.
Apply Longest Remaining Time First (LRTF) for three processes and calculate average turnaround time.
How to answer linked exam questions
Full question bankSummer 2023 Q2(C)
Calculate average waiting time using FCFS and SJF for burst times 21, 3, 6 and 2, all arrival time 0. Draw Gantt chart.
Answer pattern: define briefly, then solve stepwise and show final values/table.
Summer 2023 Q2(C) OR
Calculate average turnaround and waiting time for Round Robin (q=3) and Priority Scheduling for five processes with given burst and priorities.
Answer pattern: define briefly, then solve stepwise and show final values/table.
Summer 2024 Q2(A)
Implement Round Robin (q=3) for five processes (same arrival) and find average turnaround and waiting time.
Answer pattern: concept -> intuition -> steps -> concluding point with one application.
Summer 2024 Q2(C)
Apply Longest Remaining Time First (LRTF) for three processes and calculate average turnaround time.
Answer pattern: define briefly, then solve stepwise and show final values/table.