Bird
Raised Fist0

Consider three processes arriving at time 0 with burst times 6, 8, and 7 units respectively. Under preemptive SJF, which process will be running at time 5?

easy🧠🧾 Concept Trace Q3 of Q15
Operating Systems - Shortest Job First (SJF) - Preemptive vs Non-Preemptive
Consider three processes arriving at time 0 with burst times 6, 8, and 7 units respectively. Under preemptive SJF, which process will be running at time 5?
AProcess with burst time 8
BProcess with burst time 7
CProcess with burst time 6
DCPU is idle
Step-by-Step Solution
Solution:
  1. Step 1: Trace process execution under preemptive SJF

    All processes arrive at time 0: burst times 6, 8, and 7.
  2. Step 2: Execution timeline

    Process with burst 6 runs first from 0 to 6 (shortest remaining time).
  3. Step 3: Determine process running at time 5

    At time 5, process with burst 6 is still running (not completed yet).
  4. Final Answer:

    Option C -> Option C
  5. Quick Check:

    Process with burst 6 runs uninterrupted until completion [OK]
Quick Trick: No arrivals to preempt, shortest job runs [OK]
Common Mistakes:
MISTAKES
  • Assuming process with burst 7 or 8 runs at time 5
  • Thinking CPU is idle without reason
  • Confusing preemptive with non-preemptive behavior
Trap Explanation:
PITFALL
  • Candidates often forget that no new shorter jobs arrive to preempt the running process.
Interviewer Note:
CONTEXT
  • Tests understanding of preemptive SJF behavior with simultaneous arrivals.
Master "Shortest Job First (SJF) - Preemptive vs Non-Preemptive" in Operating Systems

2 interactive learning modes - each teaches the same concept differently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Operating Systems Quizzes