AIOS Docs
  • Welcome
  • Getting Started
    • Installation
    • Quickstart
      • Use Terminal
      • Use WebUI
    • Environment Variables Configuration
  • AIOS Kernel
    • Overview
    • LLM Core(s)
      • LiteLLM Compatible Backend
      • vLLM Backend
      • Hugging Face Backend
      • LLM Routing
    • Scheduler
      • FIFOScheduler
      • RRScheduler
    • Context
    • Memory
      • Base Layer
      • Agentic Memory Operations
    • Storage
      • sto_mount
      • sto_create_file
      • sto_create_directory
      • sto_write
      • sto_retrieve
      • sto_rollback
      • sto_share
    • Tools
    • Access
    • Syscalls
    • Terminal
  • AIOS Agent
    • How to Use Agent
    • How to Develop Agents
      • Develop with Native SDK
      • Develop with AutoGen
      • Develop with Open-Interpreter
      • Develop with MetaGPT
    • How to Publish Agents
  • AIOS-Agent SDK
    • Overview
    • LLM Core API
      • llm_chat
      • llm_chat_with_json_output
      • llm_chat_with_tool_call_output
      • llm_call_tool
      • llm_operate_file
    • Memory API
      • create_memory
      • get_memory
      • update_memory
      • delete_memory
      • search_memories
      • create_agentic_memory
    • Storage API
      • mount
      • create_file
      • create_dir
      • write_file
      • retrieve_file
      • rollback_file
      • share_file
    • Tool API
      • How to Develop Tools
    • Access API
    • Post API
    • Agent API
  • Community
    • How to Contribute
Powered by GitBook
On this page
  • BaseScheduler
  • Different scheduler implementations
  1. AIOS Kernel

Scheduler

PreviousLLM RoutingNextFIFOScheduler

Last updated 2 months ago

Instead of placing separate queues within each processing module (e.g., LLM core(s) or memory manager), we centralize all the queues within the scheduler module. This aims to isolate the responsibility for request management from the individual modules, allowing each processing module to focus on its execution and simplifies the coordination of tasks across modules.

The main purpose of the scheduler is to serve different agents queries in a fine-grained granularity (i.e., syscall level granuity) as below.

AIOS provides two main scheduler implementations to manage system calls from agents:

Feature
FIFOScheduler
RRScheduler

Task Selection

First-come, first-served

Round-robin rotation

Time Management

No time limit enforcement

Fixed time slices per task

Task Preemption

None (tasks run to completion)

Tasks can be suspended and resumed

Status Handling

Only "executing"/"done"

"executing"/"done"/"suspending"

Context Management

None

Uses SimpleContextManager

BaseScheduler

The BaseScheduler is an abstract base class that defines the common interface and functionality for all scheduler implementations in AIOS.

Abstract Methods

Method
Description

start_processing_threads()

Start threads for different request processors

stop_processing_threads()

Stop all processing threads gracefully

process_llm_requests()

Abstract method to process LLM requests

process_memory_requests()

Abstract method to process Memory requests

process_storage_requests()

Abstract method to process Storage requests

process_tool_requests()

Abstract method to process Tool requests

start()

Abstract method to start the scheduler

stop()

Abstract method to stop the scheduler

Different scheduler implementations

FIFO Scheduler
RR Scheduler
AIOS Scheduler manages the Request queue for each module, the Request queue includes both Queries (agent-to-kernel request) and Messages (module-to-module request)
Scheduling example for syscalls for different agents (use LLM Syscall for illustration simplicity)