📚 AOS Docs

Task Scheduler

CPU time allocation and task execution order

Overview

The scheduler determines which task executes at any given time, ensuring fair CPU sharing among competing tasks.

Scheduling Algorithms

Round-Robin

Priority-Based

Scheduling Events

  • ✓ Timer interrupt triggers context switch
  • ✓ I/O blocking causes task yield
  • ✓ Task completion removes from queue
  • ✓ New task creation adds to ready queue

Key Takeaways

  • ✓ Fair CPU time distribution
  • ✓ Priority-based task selection
  • ✓ Timer-driven context switching
  • ✓ I/O blocking support
  • ✓ Prevents CPU starvation