CPU Scheduling Algorithms

Explore and understand different CPU scheduling algorithms through interactive visualizations, Gantt charts, and real-time simulations.

Category:
Difficulty:
13
Total Algorithms
13
Filtered Results
3
Categories
Learning Potential
BeginnerNon-preemptive

First Come First Serve

The simplest scheduling algorithm where processes are served in the order they arrive.

Time: O(n)
Space: O(1)

Key Features:

  • Simple implementation
  • No starvation
  • Poor average waiting time
IntermediateNon-preemptive

Shortest Job First

Executes the process with the smallest execution time first, minimizing average waiting time.

Time: O(n log n)
Space: O(1)

Key Features:

  • Optimal average waiting time
  • May cause starvation
  • Requires prior knowledge
IntermediatePreemptive

Preemptive SJF (SRTF)

Preemptive version of SJF where a shorter job can interrupt a longer running job.

Time: O(n²)
Space: O(1)

Key Features:

  • Optimal for response time
  • Complex implementation
  • High overhead
BeginnerPreemptive

Round Robin

Each process gets a fixed time quantum in a circular manner, ensuring fairness.

Time: O(n)
Space: O(n)

Key Features:

  • Fair time sharing
  • No starvation
  • Context switching overhead
IntermediateNon-preemptive

Priority Scheduling

Processes are scheduled based on priority levels, with highest priority first.

Time: O(n log n)
Space: O(1)

Key Features:

  • Flexible priority system
  • May cause starvation
  • Good for real-time systems
AdvancedPreemptive

Preemptive Priority

Priority scheduling with preemption, allowing higher priority jobs to interrupt lower ones.

Time: O(n²)
Space: O(1)

Key Features:

  • Immediate response
  • Complex scheduling
  • Starvation possible
BeginnerNon-preemptive

Longest Job First

Schedules the process with the longest execution time first.

Time: O(n log n)
Space: O(1)

Key Features:

  • Opposite of SJF
  • High waiting time
  • Educational purpose
AdvancedNon-preemptive

Highest Response Ratio Next

Selects the process with the highest response ratio, balancing waiting time and service time.

Time: O(n²)
Space: O(1)

Key Features:

  • Prevents starvation
  • Optimal response ratio
  • Complex calculation
AdvancedHybrid

Multilevel Queue

Processes are divided into multiple queues with different priorities and scheduling algorithms.

Time: O(n)
Space: O(n)

Key Features:

  • Multiple queue system
  • Fixed queue assignment
  • Complex but efficient
AdvancedHybrid

Multilevel Feedback Queue

Advanced multilevel queue where processes can move between queues based on behavior.

Time: O(n)
Space: O(n)

Key Features:

  • Dynamic queue movement
  • Adaptive scheduling
  • Most complex algorithm
IntermediatePreemptive

Lottery Scheduling

Probabilistic scheduling where processes are given lottery tickets and winners are chosen randomly.

Time: O(n)
Space: O(n)

Key Features:

  • Probabilistic fairness
  • Flexible resource sharing
  • Unpredictable execution order
AdvancedPreemptive

Fair Share Scheduling

Ensures fair allocation of CPU time among users or groups rather than individual processes.

Time: O(n)
Space: O(n)

Key Features:

  • User-based fairness
  • Group scheduling
  • Complex allocation
AdvancedPreemptive

Earliest Deadline First

Real-time scheduling algorithm that schedules tasks based on their deadlines.

Time: O(n log n)
Space: O(1)

Key Features:

  • Real-time scheduling
  • Deadline-driven
  • Optimal for feasible task sets