Questions: Shortest Job First (SJF) CPU Scheduling

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

Three processes arrive simultaneously with CPU burst times of 8ms, 2ms, and 5ms. What is the average waiting time under SJF (non-preemptive)?

A5ms — the same as the FCFS average
B3ms — SJF runs them in order 2ms, 5ms, 8ms: waiting times are 0, 2, and 7
C7ms — the longest job dominates the wait
D0ms — all jobs start immediately under SJF
Question 2 Multiple Choice

Why can't a real operating system implement ideal SJF scheduling?

ASJF requires more memory than other scheduling algorithms
BSJF requires knowing each process's next CPU burst time in advance, which the OS cannot determine before the process runs
CSJF is only applicable in batch systems with no interactive users
DSJF violates POSIX scheduling standards used by modern operating systems
Question 3 True / False

Among all non-preemptive scheduling algorithms, SJF minimizes average waiting time.

TTrue
FFalse
Question 4 True / False

Preemptive SJF (Shortest Remaining Time First) is typically preferable to non-preemptive SJF because it produces lower average waiting times.

TTrue
FFalse
Question 5 Short Answer

Why does SJF cause starvation, and how do real operating systems address this problem?

Think about your answer, then reveal below.