Recall & Review
beginner
What does SJF stand for in operating systems?
SJF stands for Shortest Job First, a scheduling algorithm that selects the process with the smallest execution time to run next.
Click to reveal answer
beginner
How does SJF scheduling decide which process to run?
SJF chooses the process that requires the least amount of CPU time among the available processes.
Click to reveal answer
intermediate
What is the main advantage of SJF scheduling?
It minimizes the average waiting time for processes, making the system more efficient in handling tasks quickly.
Click to reveal answer
intermediate
What is a major drawback of SJF scheduling?
It can cause starvation, where longer processes may wait indefinitely if shorter jobs keep arriving.
Click to reveal answer
advanced
Is SJF scheduling preemptive or non-preemptive?
SJF can be both: non-preemptive SJF runs a process to completion once started; preemptive SJF (also called Shortest Remaining Time First) can interrupt a running process if a shorter job arrives.
Click to reveal answer
What does SJF scheduling prioritize?
✗ Incorrect
SJF always selects the process with the shortest execution time to run next.
Which problem can SJF scheduling cause?
✗ Incorrect
SJF can cause starvation because longer processes may wait indefinitely if shorter jobs keep arriving.
What is the main goal of SJF scheduling?
✗ Incorrect
SJF aims to minimize the average waiting time for all processes.
In preemptive SJF, what happens if a new shorter job arrives while another is running?
✗ Incorrect
Preemptive SJF interrupts the current process if a shorter job arrives.
Which of these is NOT true about SJF scheduling?
✗ Incorrect
In real systems, exact job lengths are often unknown, making SJF hard to implement perfectly.
Explain how the Shortest Job First scheduling algorithm works and its main benefits.
Think about how choosing the smallest task first affects waiting times.
You got /3 concepts.
Describe the potential problem of starvation in SJF scheduling and why it happens.
Consider what happens if short tasks keep coming before longer ones get CPU time.
You got /3 concepts.