SJF CPU Scheduling Visualizer

Docs
Dark Mode
1.0x

Add Process

FCFS

SJF

Explanation Log

SJF Algorithm Flowchart

📥

1. Arrival Time

Processes arrive at specific time units

⏱️

2. Burst Time

Each process has execution duration

🎯

3. Selection

Pick shortest burst time from ready queue

⚙️

4. Execution

Execute selected process to completion

FCFS (First Come First Serve)

  • ✅ Simple implementation
  • ❌ Can cause convoy effect
  • ❌ Higher average waiting time
  • ⚖️ Fair but not efficient
VS

SJF (Shortest Job First)

  • ✅ Minimizes waiting time
  • ✅ Optimal algorithm
  • ⚠️ Requires burst time knowledge
  • 💡 Better efficiency

Game Mode

🤔 Which algorithm will have a lower Average Waiting Time?

Select a Level:

Score: 0

Performance Dashboard

0%
CPU Utilization
⏱️
0
Throughput
🎯
0%
SJF Efficiency

Algorithm Insights

📊

Best Case for SJF

When processes have varying burst times, SJF minimizes average waiting time.

⚠️

SJF Limitation

Requires knowing burst time in advance. Can lead to starvation of long processes.

🎯

When to Use FCFS

Simple to implement. Best when all processes have similar burst times or fairness is priority.

💡

Key Takeaway

SJF is optimal for minimizing average wait time but FCFS is simpler and fairer.