</>
ShikshaCSLearn. Code. Grow.
🔍
☕ Support Us
ShikshaCSâ€ēPractice Problems
OSEasyScheduling

FCFS vs SJF Scheduling — Compare with Example

📋 Problem

Compare First-Come-First-Serve (FCFS) and Shortest-Job-First (SJF) CPU scheduling using an example with 3 processes of burst times 6, 2, and 8.

🧭 Approach

In FCFS, processes run in arrival order: 6, then 2, then 8 — the 2-unit process waits 6 units even though it's short, hurting average waiting time. In SJF, the shortest job runs first: 2, then 6, then 8 — this minimizes the average waiting time overall, but requires knowing burst times in advance (often estimated, not guaranteed).

← Back to all Problems